forked from phoenix/litellm-mirror
(feat) add enter proxy url screen
This commit is contained in:
parent
dda115fcb7
commit
5ac449a518
2 changed files with 59 additions and 0 deletions
|
@ -3,14 +3,29 @@ import React from "react";
|
|||
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 { useSearchParams } from "next/navigation";
|
||||
|
||||
|
||||
|
||||
export default function UserDashboard() {
|
||||
const searchParams = useSearchParams();
|
||||
const userID = searchParams.get("userID");
|
||||
const accessToken = searchParams.get("accessToken");
|
||||
const proxyBaseUrl = searchParams.get("proxyBaseUrl");
|
||||
|
||||
const handleProxyUrlChange = (url: string) => {
|
||||
// Do something with the entered proxy URL, e.g., save it in the state
|
||||
console.log('Entered Proxy URL:', url);
|
||||
};
|
||||
|
||||
if (proxyBaseUrl == null) {
|
||||
return (
|
||||
<div>
|
||||
<EnterProxyUrl onUrlChange={handleProxyUrlChange} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
if (userID == null || accessToken == null || proxyBaseUrl == null) {
|
||||
return (
|
||||
<Card
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue