forked from BerriAI/litellm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.tsx
More file actions
23 lines (21 loc) · 686 Bytes
/
Copy pathpage.tsx
File metadata and controls
23 lines (21 loc) · 686 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"use client";
import React, { Suspense, useEffect, useState } from "react";
import { useSearchParams } from "next/navigation";
import { modelHubCall } from "@/components/networking";
import ModelHubTable from "@/components/model_hub_table";
export default function PublicModelHubTable() {
const searchParams = useSearchParams()!;
const key = searchParams.get("key");
const [accessToken, setAccessToken] = useState<string | null>(null);
useEffect(() => {
if (!key) {
return;
}
setAccessToken(key);
}, [key]);
/**
* populate navbar
*
*/
return <ModelHubTable accessToken={accessToken} publicPage={true} premiumUser={false} userRole={null} />;
}