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
21 changes: 11 additions & 10 deletions src/components/global/navbar/User.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ function User() {
const router = useRouter();

const { id_token } = sessions?.user as { id_token: string} || {};
const handleClose = () => {
const handleClose = (url?: string) => {
setAnchorEl(null);
url && router.push(url)
};
const dropdown = [
["My Profile", "/my-profile", "/images/icon-container (2).svg"],
["API Plans", "/api-plans", "/images/API.svg"],
["API Keys", "/api-keys", "images/shield-key.svg"],
["API Plans", "/apiplans", "/images/API.svg"],
["API Keys", "/apiKeys", "images/shield-key.svg"],
]
const propsConfig = {
elevation: 0,
Expand Down Expand Up @@ -76,14 +77,14 @@ function User() {
anchorEl={anchorEl}
id="user-menu"
open={open}
onClose={handleClose}
onClick={handleClose}
onClose={()=>handleClose()}
onClick={()=>handleClose()}
PaperProps={ propsConfig}
transformOrigin={{ horizontal: 'right', vertical: 'top' }}
anchorOrigin={{ horizontal: 'right', vertical: 'bottom' }}
>
{dropdown?.map((menuItem, index) => (
<MenuItem key={index} className="ml-0" onClick={handleClose}>
<MenuItem key={index} className="ml-0" onClick={() =>handleClose(menuItem[1])}>
<ListItemIcon>
<img src={menuItem[2]} alt="" />
</ListItemIcon>
Expand All @@ -92,21 +93,21 @@ function User() {
))
}
<Divider />
<MenuItem onClick={handleClose}>
<MenuItem>
<Button fullWidth color="inherit"
variant="outlined"
onClick={() => signOut()}
startIcon={<Logout fontSize="inherit" />}>
Sing Out
Sign Out
</Button>
</MenuItem>
</Menu></>: <>
<Button fullWidth color="inherit"
variant="outlined"
onClick={()=> router.push('/login')}
startIcon={<Login fontSize="inherit" />}>
Sing In
</Button>
Sign In
</Button>
</> }
</div>
);
Expand Down
12 changes: 0 additions & 12 deletions src/views/ApiKeys/table_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,5 @@
{ "name": "Created", "sort": true }
],
"rows": [
{
"keys": "0x2824r6o923dqe3d7f",
"created": "08/12/2023"
},
{
"keys": "0x2824r6o923dqe3d7f",
"created": "08/12/2023"
},
{
"keys": "0x2824r6o923dqe3d7f",
"created": "08/12/2023"
}
]
}
4 changes: 1 addition & 3 deletions src/views/login/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,12 @@ const LoginComponent = () => {
<button
type="button"
onClick={() => handleLoginWithGoogle()}
className="w-full mt-5 text-center justify-center focus:ring-0 focus:outline-none rounded border border-dark-200 md:text-md sm:text-sm text-[10px] px-5 py-3 inline-flex items-center mb-2"
className="w-full mt-5 hidden text-center justify-center focus:ring-0 focus:outline-none rounded border border-dark-200 md:text-md sm:text-sm text-[10px] px-5 py-3 inline-flex items-center mb-2"
>
<img src="/images/google.svg" alt=""/>
<span
className="uppercase font-medium text-dark-600 ml-1 sm:ml-2 tracking-[1.5px]">continue with google</span>
</button>

<p className="text-black text-md font-weight-bold mt-5 text-center">or</p>
<input
type="text"
className="form-control text-black bottom-border w-full mt-5 mt-lg-9"
Expand Down