规范子页面函数命名
This commit is contained in:
@@ -6,7 +6,7 @@ import { useEffect, useState } from "react";
|
|||||||
import MemoryCard from "./MemoryCard";
|
import MemoryCard from "./MemoryCard";
|
||||||
import { Navbar } from "@/components/Navbar";
|
import { Navbar } from "@/components/Navbar";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Alphabet() {
|
||||||
const [chosenAlphabet, setChosenAlphabet] = useState<SupportedAlphabets | null>(null);
|
const [chosenAlphabet, setChosenAlphabet] = useState<SupportedAlphabets | null>(null);
|
||||||
const [alphabetData, setAlphabetData] = useState<Record<SupportedAlphabets, Letter[] | null>>({
|
const [alphabetData, setAlphabetData] = useState<Record<SupportedAlphabets, Letter[] | null>>({
|
||||||
japanese: null,
|
japanese: null,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import UploadArea from "./UploadArea";
|
|||||||
import VideoPanel from "./VideoPlayer/VideoPanel";
|
import VideoPanel from "./VideoPlayer/VideoPanel";
|
||||||
import { Navbar } from "@/components/Navbar";
|
import { Navbar } from "@/components/Navbar";
|
||||||
|
|
||||||
export default function Home() {
|
export default function SrtPlayer() {
|
||||||
const videoRef = useRef<HTMLVideoElement>(null);
|
const videoRef = useRef<HTMLVideoElement>(null);
|
||||||
|
|
||||||
const [videoUrl, setVideoUrl] = useState<string | null>(null);
|
const [videoUrl, setVideoUrl] = useState<string | null>(null);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { TextSpeakerItemSchema } from "@/interfaces";
|
|||||||
import z from "zod";
|
import z from "zod";
|
||||||
import { Navbar } from "@/components/Navbar";
|
import { Navbar } from "@/components/Navbar";
|
||||||
|
|
||||||
export default function Home() {
|
export default function TextSpeaker() {
|
||||||
const textareaRef = useRef<HTMLTextAreaElement>(null);
|
const textareaRef = useRef<HTMLTextAreaElement>(null);
|
||||||
const [showSpeedAdjust, setShowSpeedAdjust] = useState(false);
|
const [showSpeedAdjust, setShowSpeedAdjust] = useState(false);
|
||||||
const [showSaveList, setShowSaveList] = useState(false);
|
const [showSaveList, setShowSaveList] = useState(false);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import IMAGES from "@/config/images";
|
|||||||
import { getTTSAudioUrl } from "@/utils";
|
import { getTTSAudioUrl } from "@/utils";
|
||||||
import { Navbar } from "@/components/Navbar";
|
import { Navbar } from "@/components/Navbar";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Translator() {
|
||||||
const [ipaEnabled, setIPAEnabled] = useState(true);
|
const [ipaEnabled, setIPAEnabled] = useState(true);
|
||||||
const [voicesData, setVoicesData] = useState<{
|
const [voicesData, setVoicesData] = useState<{
|
||||||
locale: string,
|
locale: string,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { BOARD_WIDTH, TEXT_WIDTH, BOARD_HEIGHT, TEXT_SIZE } from "@/config/word-
|
|||||||
import { Word } from "@/interfaces";
|
import { Word } from "@/interfaces";
|
||||||
import { Dispatch, SetStateAction } from "react";
|
import { Dispatch, SetStateAction } from "react";
|
||||||
|
|
||||||
export default function WordBoard(
|
export default function TheBoard(
|
||||||
{ words, selectWord }: {
|
{ words, selectWord }: {
|
||||||
words: [
|
words: [
|
||||||
{
|
{
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
'use client';
|
'use client';
|
||||||
import WordBoard from "@/app/word-board/WordBoard";
|
import TheBoard from "@/app/word-board/TheBoard";
|
||||||
import Button from "../../components/Button";
|
import Button from "../../components/Button";
|
||||||
import { KeyboardEvent, useRef, useState } from "react";
|
import { KeyboardEvent, useRef, useState } from "react";
|
||||||
import { Word } from "@/interfaces";
|
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 { inspect } from "@/utils";
|
||||||
import { Navbar } from "@/components/Navbar";
|
import { Navbar } from "@/components/Navbar";
|
||||||
|
|
||||||
export default function Home() {
|
export default function WordBoard() {
|
||||||
const inputRef = useRef<HTMLInputElement>(null);
|
const inputRef = useRef<HTMLInputElement>(null);
|
||||||
const inputFileRef = useRef<HTMLInputElement>(null);
|
const inputFileRef = useRef<HTMLInputElement>(null);
|
||||||
const initialWords =
|
const initialWords =
|
||||||
@@ -144,7 +144,7 @@ export default function Home() {
|
|||||||
<Navbar></Navbar>
|
<Navbar></Navbar>
|
||||||
<div className="flex w-screen h-screen justify-center items-center">
|
<div className="flex w-screen h-screen justify-center items-center">
|
||||||
<div onKeyDown={handleKeyDown} className="p-5 bg-gray-200 rounded shadow-2xl">
|
<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">
|
<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" />
|
<input ref={inputRef} placeholder="word to operate" type="text" className="focus:outline-none border-b-2 border-black" />
|
||||||
<Button label="插入" onClick={insertWord}></Button>
|
<Button label="插入" onClick={insertWord}></Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user