From 0e7a15d2f8a89d4d8ce4d3610d31b3059bf1b407 Mon Sep 17 00:00:00 2001 From: SiteAgent Bot Date: Mon, 19 Jan 2026 16:32:22 +0800 Subject: [PATCH] manual save(2026-01-19 16:32) --- eslint.config.js | 2 +- index.html | 34 ++++- src/App.tsx | 16 ++- src/components/Footer.tsx | 56 +++++++- src/components/Footer.tsx.bak | Bin 0 -> 1888 bytes src/components/Header.tsx | 98 +++++++++++-- src/components/PostCard.tsx | 75 +++++++--- src/config.ts | 2 + src/env.ts | 3 +- src/i18n/I18nProvider.tsx | 45 ++++++ src/i18n/context.ts | 10 ++ src/i18n/translations.ts | 174 ++++++++++++++++++++++++ src/i18n/useI18n.ts | 10 ++ src/index.css | 25 ++++ src/main.tsx | 5 +- src/pages/About.tsx | 133 ++++++++++++++++++ src/pages/Categories.tsx | 74 +++++----- src/pages/CategoryDetail.tsx | 126 ++++++++--------- src/pages/Contact.tsx | 130 ++++++++++++++++++ src/pages/Home.tsx | 249 +++++++++++++++++++++++++--------- src/pages/Menu.tsx | 243 +++++++++++++++++++++++++++++++++ src/pages/News.tsx | 123 +++++++++++++++++ src/pages/NotFound.tsx | 28 ++++ src/pages/PostDetail.tsx | 157 +++++++++++---------- src/site.ts | 21 +++ src/utils/payload.ts | 11 ++ 26 files changed, 1581 insertions(+), 269 deletions(-) create mode 100644 src/components/Footer.tsx.bak create mode 100644 src/i18n/I18nProvider.tsx create mode 100644 src/i18n/context.ts create mode 100644 src/i18n/translations.ts create mode 100644 src/i18n/useI18n.ts create mode 100644 src/pages/About.tsx create mode 100644 src/pages/Contact.tsx create mode 100644 src/pages/Menu.tsx create mode 100644 src/pages/News.tsx create mode 100644 src/pages/NotFound.tsx create mode 100644 src/site.ts create mode 100644 src/utils/payload.ts diff --git a/eslint.config.js b/eslint.config.js index 5e6b472..bf25826 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -6,7 +6,7 @@ import tseslint from 'typescript-eslint' import { defineConfig, globalIgnores } from 'eslint/config' export default defineConfig([ - globalIgnores(['dist']), + globalIgnores(['dist', 'src/clientsdk/**']), { files: ['**/*.{ts,tsx}'], extends: [ diff --git a/index.html b/index.html index 9958f76..d0bbfcf 100644 --- a/index.html +++ b/index.html @@ -1,10 +1,40 @@ - + - react-template + + Xiang Hunan Kitchen | อาหารหูหนานแท้ในไทย + + + + + + + +
diff --git a/src/App.tsx b/src/App.tsx index 257538e..1e5b473 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,17 +1,23 @@ import { BrowserRouter as Router, Routes, Route } from 'react-router-dom' import { Home } from './pages/Home' +import { Menu } from './pages/Menu' +import { About } from './pages/About' +import { Contact } from './pages/Contact' +import { News } from './pages/News' import { PostDetail } from './pages/PostDetail' -import { CategoriesPage } from './pages/Categories' -import { CategoryDetail } from './pages/CategoryDetail' +import { NotFound } from './pages/NotFound' function App() { return ( } /> - } /> - } /> - } /> + } /> + } /> + } /> + } /> + } /> + } /> ) diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index fffde69..b6cc250 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -1,13 +1,57 @@ import React from 'react' +import { SITE } from '../site' +import { useI18n } from '../i18n/useI18n' export const Footer: React.FC = () => { + const { t, locale } = useI18n() + return ( -