Skip to content

Commit

Permalink
chore: rename my account to my cart and set default tab value to cart
Browse files Browse the repository at this point in the history
  • Loading branch information
KimiaMontazeri committed Nov 30, 2023
1 parent aa287f3 commit 2f17b4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/app-bar/AppBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default function DrawerAppBar() {
open={Boolean(anchorEl)}
onClose={handleClose}
>
<MenuItem onClick={() => window.location.replace(ROUTES.myAccount.path)}>My account</MenuItem>
<MenuItem onClick={() => window.location.replace(ROUTES.myAccount.path)}>My cart</MenuItem>
<MenuItem onClick={handleLogout}>Logout</MenuItem>
</Menu>
</Box>
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/pages/my-account/MyAccount.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useState } from 'react';
import { Box, Button, CircularProgress, Divider, Stack, Tab, Tabs, Typography } from '@mui/material';
import ItemCard from '../../components/item-card/item-card.jsx';
import Toast from '../../components/toast/Toast.jsx';
import { Helper } from '../../utils/Helper.js';
import useMyAccount from './useMyAccount.js';

const TAB_ITEMS = ['Workshops', 'Presentations', 'Cart'];
Expand All @@ -19,7 +18,7 @@ const MyAccount = () => {
openToast,
setOpenToast,
} = useMyAccount();
const [tabValue, setTabValue] = useState(TAB_ITEMS[0]);
const [tabValue, setTabValue] = useState(TAB_ITEMS[2]);

const handleChangeTab = (event, newValue) => {
setTabValue(newValue);
Expand Down

0 comments on commit 2f17b4d

Please sign in to comment.