diff --git a/src/page/changelog/index.tsx b/src/page/changelog/index.tsx deleted file mode 100644 index 140033b..0000000 --- a/src/page/changelog/index.tsx +++ /dev/null @@ -1,153 +0,0 @@ -import { useMemo } from "react" -import { useTranslation } from "react-i18next" -import Seo from "@/components/seo" - -type ChangeTypeKey = "feat" | "fix" | "refactor" | "chore" - -interface ChangeEntry { - type: ChangeTypeKey - title: string - description?: string - date?: string -} - -interface ChangelogVersion { - version: string - date: string - entries: ChangeEntry[] -} - -const CHANGELOG_DATA: ChangelogVersion[] = [ - { - version: "1.1.1", - date: "2026-02-24", - entries: [ - { - type: "feat", - title: "JSON Path Highlighting", - description: "Add highlighting for JSON Path expression." - } - ] - }, - { - version: "1.1.0", - date: "2026-02-24", - entries: [ - { - type: "feat", - title: "JSON Grid", - description: "Convert JSON arrays into sortable table view with CSV export functionality" - }, - { - type: "feat", - title: "Tools Layout with Collapsible Menu", - description: "Added a dedicated tools layout with categorised sidebar menu for quick tool switching", - }, - { - type: "feat", - title: "Copy Selected JSON Feature", - description: "Added ability to copy JSONPath selected data as raw JSON with one-click action", - }, - { - type: "feat", - title: "Tool Categories", - description: "Organised tools into JSON Processing (JSON Viewer, JSON Grid) and Daily Tools (BMI Calculator)", - }, - { - type: "fix", - title: "Live Application Link", - description: "Updated live application link in README", - }, - ], - }, - { - version: "1.0.0", - date: "2026-01-19", - entries: [ - { - type: "feat", - title: "JSON Viewer with JSONPath", - description: "Full-featured JSON viewer with JSONPath query support and CSV export", - }, - { - type: "feat", - title: "BMI Calculator", - description: "Calculate Body Mass Index with category guidance and health advice", - }, - { - type: "feat", - title: "Internationalization", - description: "Support for English (GB) and Simplified Chinese with language switcher", - }, - ], - }, -] - -export default function Changelog() { - const { t } = useTranslation() - - const changeTypeLabels = useMemo(() => { - const labels: Record = { - feat: { label: t("changelog.featureType"), colour: "bg-emerald-100 text-emerald-700" }, - fix: { label: t("changelog.fixType"), colour: "bg-blue-100 text-blue-700" }, - refactor: { label: t("changelog.refactorType"), colour: "bg-purple-100 text-purple-700" }, - chore: { label: t("changelog.choreType"), colour: "bg-slate-100 text-slate-700" }, - } - return labels - }, [t]) - - return ( -
- - - {/* Header */} -
-
-

{t("changelog.title")}

-

{t("changelog.description")}

-
-
- - {/* Timeline */} -
-
- {CHANGELOG_DATA.map((changelog) => ( -
- {/* Version header */} -
-

v{changelog.version}

- -
- - {/* Changes list */} -
- {changelog.entries.map((entry, idx) => { - const typeInfo = changeTypeLabels[entry.type as ChangeTypeKey] - return ( -
-
- - {typeInfo.label} - -
-

{entry.title}

- {entry.description && ( -

{entry.description}

- )} -
-
-
- ) - })} -
-
- ))} -
-
-
- ) -} diff --git a/src/router/index.tsx b/src/router/index.tsx index c79bf3b..5aa0989 100644 --- a/src/router/index.tsx +++ b/src/router/index.tsx @@ -35,11 +35,7 @@ const router = createBrowserRouter( { path: "contact", lazy: lazy(() => import("@/page/contact")), - }, - { - path: "changelog", - lazy: lazy(() => import("@/page/changelog")), - }, + } ], }, {