(feat) view userID on navbar

This commit is contained in:
ishaan-jaff 2024-02-03 12:09:49 -08:00
parent 1a8bfbca6a
commit 1dcb8c8097
3 changed files with 13 additions and 5 deletions

View file

@ -4,8 +4,7 @@ import UserDashboard from "../components/user_dashboard";
const CreateKeyPage = () => { const CreateKeyPage = () => {
return ( return (
<Suspense fallback={<div>Loading...</div>}> <Suspense fallback={<div>Loading...</div>}>
<div className="flex min-h-screen flex-col items-center"> <div className="flex min-h-screen flex-col ">
<Navbar />
<UserDashboard /> <UserDashboard />
</div> </div>
</Suspense> </Suspense>

View file

@ -3,7 +3,8 @@
*/ */
import { message } from 'antd'; import { message } from 'antd';
const proxyBaseUrl = null // const proxyBaseUrl = null;
const proxyBaseUrl = "http://localhost:4000" // http://localhost:4000
export const keyCreateCall = async ( export const keyCreateCall = async (
accessToken: string, accessToken: string,

View file

@ -5,10 +5,12 @@ import { Grid, Col, Card, Text } from "@tremor/react";
import CreateKey from "./create_key_button"; import CreateKey from "./create_key_button";
import ViewKeyTable from "./view_key_table"; import ViewKeyTable from "./view_key_table";
import EnterProxyUrl from "./enter_proxy_url"; import EnterProxyUrl from "./enter_proxy_url";
import Navbar from "./navbar";
import { useSearchParams } from "next/navigation"; import { useSearchParams } from "next/navigation";
import { jwtDecode } from "jwt-decode"; import { jwtDecode } from "jwt-decode";
const proxyBaseUrl = null // const proxyBaseUrl = null;
const proxyBaseUrl = "http://localhost:4000" // http://localhost:4000
const UserDashboard = () => { const UserDashboard = () => {
const [data, setData] = useState<null | any[]>(null); // Keep the initialization of state here const [data, setData] = useState<null | any[]>(null); // Keep the initialization of state here
@ -67,7 +69,11 @@ const UserDashboard = () => {
return ( return (
<Grid numItems={1} className="gap-0 p-10 h-[75vh] w-full"> <div>
<Navbar
userID={userID}
/>
<Grid numItems={1} className="gap-0 p-10 h-[75vh] w-full">
<Col numColSpan={1}> <Col numColSpan={1}>
<ViewKeyTable <ViewKeyTable
userID={userID} userID={userID}
@ -83,6 +89,8 @@ const UserDashboard = () => {
/> />
</Col> </Col>
</Grid> </Grid>
</div>
); );
}; };