(feat) view userID on navbar

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

View file

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

View file

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

View file

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