From 4cd34106b07cf15abcc0dbf398e674cd3369d6fc Mon Sep 17 00:00:00 2001 From: "hamed@B" Date: Mon, 14 Sep 2026 13:27:17 +0200 Subject: [PATCH] refactor: migrate project to TypeScript and translate comments to English --- .gitignore | 1 + .idea/workspace.xml | 110 ++++++++++++------ README.md | 35 +++--- ...anguageContext.jsx => LanguageContext.tsx} | 18 ++- .../{ThemeContext.jsx => ThemeContext.tsx} | 16 ++- app/{layout.jsx => layout.tsx} | 8 +- app/{page.jsx => page.tsx} | 0 app/{providers.jsx => providers.tsx} | 10 +- .../{AboutSection.jsx => AboutSection.tsx} | 2 +- components/{CartDrawer.jsx => CartDrawer.tsx} | 15 +-- ...eaturesSection.jsx => FeaturesSection.tsx} | 2 +- .../{FloatingItems.jsx => FloatingItems.tsx} | 9 +- components/{Footer.jsx => Footer.tsx} | 2 +- components/{Header.jsx => Header.tsx} | 8 +- .../{HeroSection.jsx => HeroSection.tsx} | 35 +++--- ...talShowcase.jsx => HorizontalShowcase.tsx} | 19 +-- ...{LanguageToggle.jsx => LanguageToggle.tsx} | 2 +- ...ationsSection.jsx => LocationsSection.tsx} | 2 +- ...{MobileShowcase.jsx => MobileShowcase.tsx} | 11 +- ...howcaseSection.jsx => ShowcaseSection.tsx} | 6 +- .../{ThemeToggle.jsx => ThemeToggle.tsx} | 0 .../{VendingCard.jsx => VendingCard.tsx} | 16 +-- data/{content.js => content.ts} | 10 +- jsconfig.json | 9 -- lib/{axios.js => axios.ts} | 8 +- next-env.d.ts | 5 + next.config.js | 4 +- package-lock.json | 65 ++++++++++- package.json | 21 ++-- store/{cartSlice.js => cartSlice.ts} | 23 ++-- store/hooks.ts | 7 ++ store/{store.js => store.ts} | 4 + tailwind.config.js => tailwind.config.ts | 6 +- tsconfig.json | 22 ++++ types/domain.ts | 81 +++++++++++++ 35 files changed, 427 insertions(+), 165 deletions(-) rename app/context/{LanguageContext.jsx => LanguageContext.tsx} (67%) rename app/context/{ThemeContext.jsx => ThemeContext.tsx} (71%) rename app/{layout.jsx => layout.tsx} (78%) rename app/{page.jsx => page.tsx} (100%) rename app/{providers.jsx => providers.tsx} (87%) rename components/{AboutSection.jsx => AboutSection.tsx} (89%) rename components/{CartDrawer.jsx => CartDrawer.tsx} (90%) rename components/{FeaturesSection.jsx => FeaturesSection.tsx} (91%) rename components/{FloatingItems.jsx => FloatingItems.tsx} (84%) rename components/{Footer.jsx => Footer.tsx} (95%) rename components/{Header.jsx => Header.tsx} (94%) rename components/{HeroSection.jsx => HeroSection.tsx} (73%) rename components/{HorizontalShowcase.jsx => HorizontalShowcase.tsx} (91%) rename components/{LanguageToggle.jsx => LanguageToggle.tsx} (89%) rename components/{LocationsSection.jsx => LocationsSection.tsx} (90%) rename components/{MobileShowcase.jsx => MobileShowcase.tsx} (93%) rename components/{ShowcaseSection.jsx => ShowcaseSection.tsx} (80%) rename components/{ThemeToggle.jsx => ThemeToggle.tsx} (100%) rename components/{VendingCard.jsx => VendingCard.tsx} (90%) rename data/{content.js => content.ts} (99%) delete mode 100644 jsconfig.json rename lib/{axios.js => axios.ts} (75%) create mode 100644 next-env.d.ts rename store/{cartSlice.js => cartSlice.ts} (69%) create mode 100644 store/hooks.ts rename store/{store.js => store.ts} (66%) rename tailwind.config.js => tailwind.config.ts (93%) create mode 100644 tsconfig.json create mode 100644 types/domain.ts diff --git a/.gitignore b/.gitignore index 95ac1a8..a9f0bfc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ out/ .env*.local .DS_Store npm-debug.log* +*.tsbuildinfo diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9a9dd30..b3a64c6 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,8 +4,38 @@