feat: initial commit
This commit is contained in:
31
src/routes/__root.tsx
Normal file
31
src/routes/__root.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import { createRootRoute, Link, Outlet } from "@tanstack/react-router"
|
||||
|
||||
export const Route = createRootRoute({
|
||||
component: RootLayout,
|
||||
})
|
||||
|
||||
function RootLayout() {
|
||||
return (
|
||||
<div className="min-h-screen bg-white text-gray-900">
|
||||
<header className="border-b px-4 py-3">
|
||||
<nav className="mx-auto max-w-5xl flex items-center gap-6">
|
||||
<Link to="/" className="text-lg font-bold">
|
||||
English App
|
||||
</Link>
|
||||
<Link to="/toeic" className="text-sm text-gray-600 hover:text-gray-900">
|
||||
Luyện đề
|
||||
</Link>
|
||||
<Link to="/writing" className="text-sm text-gray-600 hover:text-gray-900">
|
||||
Writing
|
||||
</Link>
|
||||
<Link to="/vocab" className="text-sm text-gray-600 hover:text-gray-900">
|
||||
Từ vựng
|
||||
</Link>
|
||||
</nav>
|
||||
</header>
|
||||
<main className="mx-auto max-w-5xl px-4 py-6">
|
||||
<Outlet />
|
||||
</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
6
src/routes/index.tsx
Normal file
6
src/routes/index.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
import { createFileRoute } from "@tanstack/react-router"
|
||||
import { Home } from "@/pages/Home"
|
||||
|
||||
export const Route = createFileRoute("/")({
|
||||
component: Home,
|
||||
})
|
||||
6
src/routes/toeic.index.tsx
Normal file
6
src/routes/toeic.index.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
import { createFileRoute } from "@tanstack/react-router"
|
||||
import { ToeicPractice } from "@/pages/ToeicPractice"
|
||||
|
||||
export const Route = createFileRoute("/toeic/")({
|
||||
component: ToeicPractice,
|
||||
})
|
||||
15
src/routes/toeic.part.$partId.tsx
Normal file
15
src/routes/toeic.part.$partId.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import { createFileRoute } from "@tanstack/react-router"
|
||||
|
||||
export const Route = createFileRoute("/toeic/part/$partId")({
|
||||
component: ToeicPartConfig,
|
||||
})
|
||||
|
||||
function ToeicPartConfig() {
|
||||
const { partId } = Route.useParams()
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<h1 className="text-2xl font-bold">TOEIC Part {partId}</h1>
|
||||
<p className="text-gray-500">Cấu hình bài thi — placeholder</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
6
src/routes/toeic.result.tsx
Normal file
6
src/routes/toeic.result.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
import { createFileRoute } from "@tanstack/react-router"
|
||||
import { TestResult } from "@/pages/TestResult"
|
||||
|
||||
export const Route = createFileRoute("/toeic/result")({
|
||||
component: TestResult,
|
||||
})
|
||||
6
src/routes/toeic.session.tsx
Normal file
6
src/routes/toeic.session.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
import { createFileRoute } from "@tanstack/react-router"
|
||||
import { TestSession } from "@/pages/TestSession"
|
||||
|
||||
export const Route = createFileRoute("/toeic/session")({
|
||||
component: TestSession,
|
||||
})
|
||||
9
src/routes/toeic.tsx
Normal file
9
src/routes/toeic.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { createFileRoute, Outlet } from "@tanstack/react-router"
|
||||
|
||||
export const Route = createFileRoute("/toeic")({
|
||||
component: ToeicLayout,
|
||||
})
|
||||
|
||||
function ToeicLayout() {
|
||||
return <Outlet />
|
||||
}
|
||||
6
src/routes/vocab.tsx
Normal file
6
src/routes/vocab.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
import { createFileRoute } from "@tanstack/react-router"
|
||||
import { Vocabulary } from "@/pages/Vocabulary"
|
||||
|
||||
export const Route = createFileRoute("/vocab")({
|
||||
component: Vocabulary,
|
||||
})
|
||||
6
src/routes/writing.tsx
Normal file
6
src/routes/writing.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
import { createFileRoute } from "@tanstack/react-router"
|
||||
import { WritingChecker } from "@/pages/WritingChecker"
|
||||
|
||||
export const Route = createFileRoute("/writing")({
|
||||
component: WritingChecker,
|
||||
})
|
||||
Reference in New Issue
Block a user