规范子页面函数命名

This commit is contained in:
2025-10-23 11:17:15 +08:00
parent 89ef27eb57
commit e6d6096636
6 changed files with 8 additions and 8 deletions

View File

@@ -6,7 +6,7 @@ import { useEffect, useState } from "react";
import MemoryCard from "./MemoryCard";
import { Navbar } from "@/components/Navbar";
export default function Home() {
export default function Alphabet() {
const [chosenAlphabet, setChosenAlphabet] = useState<SupportedAlphabets | null>(null);
const [alphabetData, setAlphabetData] = useState<Record<SupportedAlphabets, Letter[] | null>>({
japanese: null,

View File

@@ -5,7 +5,7 @@ import UploadArea from "./UploadArea";
import VideoPanel from "./VideoPlayer/VideoPanel";
import { Navbar } from "@/components/Navbar";
export default function Home() {
export default function SrtPlayer() {
const videoRef = useRef<HTMLVideoElement>(null);
const [videoUrl, setVideoUrl] = useState<string | null>(null);

View File

@@ -11,7 +11,7 @@ import { TextSpeakerItemSchema } from "@/interfaces";
import z from "zod";
import { Navbar } from "@/components/Navbar";
export default function Home() {
export default function TextSpeaker() {
const textareaRef = useRef<HTMLTextAreaElement>(null);
const [showSpeedAdjust, setShowSpeedAdjust] = useState(false);
const [showSaveList, setShowSaveList] = useState(false);

View File

@@ -8,7 +8,7 @@ import IMAGES from "@/config/images";
import { getTTSAudioUrl } from "@/utils";
import { Navbar } from "@/components/Navbar";
export default function Home() {
export default function Translator() {
const [ipaEnabled, setIPAEnabled] = useState(true);
const [voicesData, setVoicesData] = useState<{
locale: string,

View File

@@ -4,7 +4,7 @@ import { BOARD_WIDTH, TEXT_WIDTH, BOARD_HEIGHT, TEXT_SIZE } from "@/config/word-
import { Word } from "@/interfaces";
import { Dispatch, SetStateAction } from "react";
export default function WordBoard(
export default function TheBoard(
{ words, selectWord }: {
words: [
{

View File

@@ -1,5 +1,5 @@
'use client';
import WordBoard from "@/app/word-board/WordBoard";
import TheBoard from "@/app/word-board/TheBoard";
import Button from "../../components/Button";
import { KeyboardEvent, useRef, useState } from "react";
import { Word } from "@/interfaces";
@@ -7,7 +7,7 @@ import { BOARD_WIDTH, TEXT_WIDTH, BOARD_HEIGHT, TEXT_SIZE } from "@/config/word-
import { inspect } from "@/utils";
import { Navbar } from "@/components/Navbar";
export default function Home() {
export default function WordBoard() {
const inputRef = useRef<HTMLInputElement>(null);
const inputFileRef = useRef<HTMLInputElement>(null);
const initialWords =
@@ -144,7 +144,7 @@ export default function Home() {
<Navbar></Navbar>
<div className="flex w-screen h-screen justify-center items-center">
<div onKeyDown={handleKeyDown} className="p-5 bg-gray-200 rounded shadow-2xl">
<WordBoard selectWord={selectWord} words={words as [Word]} setWords={setWords} />
<TheBoard selectWord={selectWord} words={words as [Word]} setWords={setWords} />
<div className="flex justify-center rounded mt-3 gap-1">
<input ref={inputRef} placeholder="word to operate" type="text" className="focus:outline-none border-b-2 border-black" />
<Button label="插入" onClick={insertWord}></Button>