Hello everyone, in this project : I tried to complete this project by using the popular JavaScript framework , Reactjs and by using the TypeScript language, Tailwind framework, and Material UI. 🔥
- User data is stored in local storage during purchase and is not lost when refreshing or leaving the site!😉
- just 11 line css code 🤯 (often by tailwind).
- 6 page by react-router-dom.
- this project completely written by typescript.
- API and data available on the site, due to the lack of a backend developer, fake api is used, which is available in the Json file.
- After adding the product, the user can go to the shopping cart and view his product, add or remove it if needed.
- Responsive website for any device screens
function App() {
const {login} = useAppContext()
return (
<>
<Layout >
<NavbarSite />
<Routes>
<Route path='/' element={<Main />} />
<Route path='/store' element={<Store />} />
<Route path='/clothes' element={<Clothes />} />
<Route path='/electrics' element={<Electrics />} />
<Route path='/login' element={ login ? <Navigate to={"/"} /> :<Login />} />
<Route path='/product/:id' element={<ProductPage />} />
<Route element={<PrivateRoute />}>
<Route path='/cart' element={<Cart />} />
</Route>
</Routes>
<Footer />
</Layout>
</>
);
}
export default App;npx json-server db.json -p 8001


