summaryrefslogtreecommitdiffhomepage
path: root/packages/console/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/console/app/src')
-rw-r--r--packages/console/app/src/routes/workspace/[id]/index.tsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/console/app/src/routes/workspace/[id]/index.tsx b/packages/console/app/src/routes/workspace/[id]/index.tsx
index a5a8bb469..3716674a7 100644
--- a/packages/console/app/src/routes/workspace/[id]/index.tsx
+++ b/packages/console/app/src/routes/workspace/[id]/index.tsx
@@ -4,8 +4,14 @@ import { UsageSection } from "./usage-section"
import { ModelSection } from "./model-section"
import { ProviderSection } from "./provider-section"
import { IconLogo } from "~/component/icon"
+import { createAsync, useParams } from "@solidjs/router"
+import { querySessionInfo } from "../common"
+import { Show } from "solid-js"
export default function () {
+ const params = useParams()
+ const userInfo = createAsync(() => querySessionInfo(params.id))
+
return (
<div data-page="workspace-[id]">
<section data-component="title-section">
@@ -22,7 +28,9 @@ export default function () {
<div data-slot="sections">
<NewUserSection />
<ModelSection />
- <ProviderSection />
+ <Show when={userInfo()?.isAdmin}>
+ <ProviderSection />
+ </Show>
<UsageSection />
</div>
</div>