This commit is contained in:
Damien Ostler 2024-02-15 22:18:20 -05:00
parent 6c2acada86
commit 13bd42ecbd
4 changed files with 29 additions and 43 deletions

View File

@ -1,9 +0,0 @@
export type User = {
email: string;
email_verified: boolean;
name: string;
nickname: string;
picture: string;
sub: string;
updated_at: string;
};

View File

@ -3,7 +3,6 @@ import { useTheme } from '@mui/material/styles';
import AppBar from '@mui/material/AppBar'; import AppBar from '@mui/material/AppBar';
import Tabs from '@mui/material/Tabs'; import Tabs from '@mui/material/Tabs';
import Tab from '@mui/material/Tab'; import Tab from '@mui/material/Tab';
import Layout from "../components/layout";
import { Grid, Button, Typography, TextField, Box, CircularProgress, IconButton } from "@mui/material"; import { Grid, Button, Typography, TextField, Box, CircularProgress, IconButton } from "@mui/material";
import { useState, useEffect,useRef } from "react"; import { useState, useEffect,useRef } from "react";
import Card from '@mui/material/Card'; import Card from '@mui/material/Card';
@ -170,7 +169,6 @@ const SellerDashoard = (ctx) => {
<CircularProgress /> <CircularProgress />
</Box> </Box>
) : ( ) : (
<Layout user={user} loading={isLoading}>
<Grid container > <Grid container >
{(Object.keys(sellerData).length > 0 ? ( {(Object.keys(sellerData).length > 0 ? (
<> <>
@ -197,9 +195,7 @@ const SellerDashoard = (ctx) => {
<Grid item container xs={12} sm={12}> <Grid item container xs={12} sm={12}>
</Grid> </Grid>
</Grid> </Grid>
</Layout>)} )};
</> </>);
); }
};
export default SellerDashoard; export default SellerDashoard;

0
pages/dashboard.tsx Normal file
View File

View File

@ -1,5 +1,4 @@
import { withPageAuthRequired } from "@auth0/nextjs-auth0/client"; import { withPageAuthRequired } from "@auth0/nextjs-auth0/client";
import Layout from "../components/layout";
import { User } from "../interfaces"; import { User } from "../interfaces";
type ProfileCardProps = { type ProfileCardProps = {
@ -23,9 +22,9 @@ const ProfileCard = ({ user }: ProfileCardProps) => {
const Profile = ({ user, isLoading }) => { const Profile = ({ user, isLoading }) => {
return ( return (
<Layout user={user} loading={isLoading}> <>
{isLoading ? <>Loading</> : <ProfileCard user={user} />} {isLoading ? <>Loading</> : <ProfileCard user={user} />}
</Layout> </>
); );
}; };