Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .env.example

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.vercel
# dependencies
node_modules
/node_modules

# production
/build

# misc
.DS_Store
.env
21 changes: 3 additions & 18 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed frontend/public/images/airpods.jpg
Binary file not shown.
Binary file removed frontend/public/images/alexa.jpg
Binary file not shown.
Binary file removed frontend/public/images/camera.jpg
Binary file not shown.
Binary file removed frontend/public/images/mouse.jpg
Binary file not shown.
Binary file removed frontend/public/images/phone.jpg
Binary file not shown.
Binary file removed frontend/public/images/playstation.jpg
Binary file not shown.
Binary file added frontend/public/images/salwar1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/images/salwar2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/images/salwar3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed frontend/public/images/sample.jpg
Binary file not shown.
Binary file removed frontend/public/images/screens.png
Binary file not shown.
2 changes: 1 addition & 1 deletion frontend/src/components/Product.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Product = ({ product }) => {
/>
</Card.Text>

<Card.Text as='h3'>${product.price}</Card.Text>
<Card.Text as='h3'>{product.price}</Card.Text>
</Card.Body>
</Card>
);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ProductCarousel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ProductCarousel = () => {
<Image src={product.image} alt={product.name} fluid />
<Carousel.Caption className='carousel-caption'>
<h2 className='text-white text-right'>
{product.name} (${product.price})
{product.name} ({product.price})
</h2>
</Carousel.Caption>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/screens/HomeScreen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const HomeScreen = () => {
keyword,
pageNumber,
});

console.log('data', data);
return (
<>
{!keyword ? (
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/screens/OrderScreen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,25 +190,25 @@ const OrderScreen = () => {
<ListGroup.Item>
<Row>
<Col>Items</Col>
<Col>${order.itemsPrice}</Col>
<Col>{order.itemsPrice}</Col>
</Row>
</ListGroup.Item>
<ListGroup.Item>
<Row>
<Col>Shipping</Col>
<Col>${order.shippingPrice}</Col>
<Col>{order.shippingPrice}</Col>
</Row>
</ListGroup.Item>
<ListGroup.Item>
<Row>
<Col>Tax</Col>
<Col>${order.taxPrice}</Col>
<Col>{order.taxPrice}</Col>
</Row>
</ListGroup.Item>
<ListGroup.Item>
<Row>
<Col>Total</Col>
<Col>${order.totalPrice}</Col>
<Col>{order.totalPrice}</Col>
</Row>
</ListGroup.Item>
{!order.isPaid && (
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/screens/ProductScreen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const ProductScreen = () => {
text={`${product.numReviews} reviews`}
/>
</ListGroup.Item>
<ListGroup.Item>Price: ${product.price}</ListGroup.Item>
<ListGroup.Item>Price: {product.price}</ListGroup.Item>
<ListGroup.Item>
Description: {product.description}
</ListGroup.Item>
Expand All @@ -107,7 +107,7 @@ const ProductScreen = () => {
<Row>
<Col>Price:</Col>
<Col>
<strong>${product.price}</strong>
<strong>{product.price}</strong>
</Col>
</Row>
</ListGroup.Item>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/screens/admin/OrderListScreen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const OrderListScreen = () => {
<td>{order._id}</td>
<td>{order.user && order.user.name}</td>
<td>{order.createdAt.substring(0, 10)}</td>
<td>${order.totalPrice}</td>
<td>{order.totalPrice}</td>
<td>
{order.isPaid ? (
order.paidAt.substring(0, 10)
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/screens/admin/ProductListScreen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const ProductListScreen = () => {
<tr key={product._id}>
<td>{product._id}</td>
<td>{product.name}</td>
<td>${product.price}</td>
<td>{product.price}</td>
<td>{product.category}</td>
<td>{product.brand}</td>
<td>
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/screens/admin/RazorPay.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// const Razorpay = require('razorpay');
import { Razorpay } from 'razorpay';

const razorpayInstance = new Razorpay({
key_id: 'YOUR_RAZORPAY_KEY_ID',
key_secret: 'YOUR_RAZORPAY_KEY_SECRET',
});

module.exports = razorpayInstance;
1 change: 1 addition & 0 deletions frontend/src/slices/apiSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const baseQuery = fetchBaseQuery({
});

async function baseQueryWithAuth(args, api, extra) {
console.log('api', api);
const result = await baseQuery(args, api, extra);
// Dispatch the logout action on 401.
if (result.error && result.error.status === 401) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/slices/authSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const initialState = {
? JSON.parse(localStorage.getItem('userInfo'))
: null,
};

console.log('initialState', initialState);
const authSlice = createSlice({
name: 'auth',
initialState,
Expand Down
Loading