mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-11 06:44:40 +00:00
feat(FRONTEND): Moved User Dropdown to Search Space Dashboard
This commit is contained in:
parent
51875e5b8e
commit
d103e21a68
7 changed files with 169 additions and 98 deletions
32
surfsense_web/app/dashboard/api-key/client-wrapper.tsx
Normal file
32
surfsense_web/app/dashboard/api-key/client-wrapper.tsx
Normal file
|
@ -0,0 +1,32 @@
|
|||
'use client'
|
||||
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import dynamic from 'next/dynamic'
|
||||
|
||||
// Loading component with animation
|
||||
const LoadingComponent = () => (
|
||||
<div className="flex flex-col justify-center items-center min-h-screen">
|
||||
<div className="w-16 h-16 border-4 border-primary border-t-transparent rounded-full animate-spin mb-4"></div>
|
||||
<p className="text-muted-foreground">Loading API Key Management...</p>
|
||||
</div>
|
||||
)
|
||||
|
||||
// Dynamically import the ApiKeyClient component
|
||||
const ApiKeyClient = dynamic(() => import('./api-key-client'), {
|
||||
ssr: false,
|
||||
loading: () => <LoadingComponent />
|
||||
})
|
||||
|
||||
export default function ClientWrapper() {
|
||||
const [isMounted, setIsMounted] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
setIsMounted(true)
|
||||
}, [])
|
||||
|
||||
if (!isMounted) {
|
||||
return <LoadingComponent />
|
||||
}
|
||||
|
||||
return <ApiKeyClient />
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue