-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from builtbysuraj/dev
Cart page, Payment Integration
- Loading branch information
Showing
46 changed files
with
1,162 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export default function Form() { | ||
return ( | ||
<> | ||
<div>Form</div> | ||
</> | ||
) | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type ButtonType = React.ComponentPropsWithoutRef<'button'> | ||
|
||
export default function Button({ children, ...props }: ButtonType) { | ||
return <button {...props}>{children}</button> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* eslint-disable react-refresh/only-export-components */ | ||
|
||
// import { forwardRef } from 'react' | ||
|
||
// function Input({ label, type = 'text', className = '', ...props }, ref) { | ||
// return <>{label && <label htmlFor="">{label}</label>}</> | ||
// } | ||
|
||
// export default forwardRef(Input) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { lazy } from 'react' | ||
|
||
const HomePage = lazy(() => import('./pages/home/HomePage')) | ||
const CartPage = lazy(() => import('./pages/cart/CartPage')) | ||
const ProductDetailsPage = lazy( | ||
() => import('./pages/product-details/ProductDetailsPage') | ||
) | ||
const ProductListingPage = lazy( | ||
() => import('./pages/product-listing/ProductListingPage') | ||
) | ||
const LoginPage = lazy(() => import('./pages/login/LoginPage')) | ||
const SignUpPage = lazy(() => import('./pages/signup/SignUpPage')) | ||
const PaymentSuccess = lazy( | ||
() => import('./pages/payment-success/PaymentSuccess') | ||
) | ||
|
||
export { | ||
CartPage, | ||
HomePage, | ||
LoginPage, | ||
PaymentSuccess, | ||
ProductDetailsPage, | ||
ProductListingPage, | ||
SignUpPage, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,22 @@ | ||
import { createRoot } from 'react-dom/client' | ||
import { Provider } from 'react-redux' | ||
import { BrowserRouter } from 'react-router-dom' | ||
import { RouterProvider } from 'react-router-dom' | ||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query' | ||
|
||
import { ThemeProvider, createTheme } from '@mui/material' | ||
import App from './App' | ||
import './assets/css/reset.css' | ||
import router from './routes' | ||
import store from './state/store' | ||
|
||
if (process.env.NODE_ENV !== 'development') { | ||
console.log = () => {} | ||
// console.error = () => {} | ||
// console.warn = () => {} | ||
} | ||
|
||
const theme = createTheme({ | ||
typography: {}, | ||
palette: { | ||
primary: { | ||
main: '#1D3557', | ||
}, | ||
secondary: { | ||
main: '#DDA15E', | ||
}, | ||
}, | ||
components: { | ||
MuiButton: { | ||
styleOverrides: { | ||
root: { | ||
// color: red[300], | ||
}, | ||
}, | ||
defaultProps: { | ||
disableElevation: true, | ||
disableRipple: true, | ||
disableFocusRipple: true, | ||
}, | ||
}, | ||
MuiAppBar: { | ||
styleOverrides: { | ||
root: { | ||
background: '#2874f0', | ||
height: '3.6rem', | ||
}, | ||
}, | ||
defaultProps: { | ||
elevation: 1, | ||
position: 'sticky', | ||
}, | ||
}, | ||
}, | ||
}) | ||
const queryClient = new QueryClient() | ||
|
||
createRoot(document.querySelector('#root') as HTMLElement).render( | ||
<Provider store={store}> | ||
<ThemeProvider theme={theme}> | ||
<BrowserRouter> | ||
<App /> | ||
</BrowserRouter> | ||
</ThemeProvider> | ||
<QueryClientProvider client={queryClient}> | ||
<RouterProvider router={router} /> | ||
</QueryClientProvider> | ||
</Provider> | ||
) |
Oops, something went wrong.