wip: fix light mode
This commit is contained in:
@@ -5,6 +5,8 @@ import { PropsWithChildren, createContext, useContext } from 'react';
|
||||
|
||||
import { NDKInstance } from '@libs/ndk/instance';
|
||||
|
||||
import { LoaderIcon } from '@shared/icons';
|
||||
|
||||
interface NDKContext {
|
||||
ndk: undefined | NDK;
|
||||
relayUrls: string[];
|
||||
@@ -20,6 +22,22 @@ const NDKContext = createContext<NDKContext>({
|
||||
const NDKProvider = ({ children }: PropsWithChildren<object>) => {
|
||||
const { ndk, relayUrls, fetcher } = NDKInstance();
|
||||
|
||||
if (!ndk) {
|
||||
return (
|
||||
<div
|
||||
data-tauri-drag-region
|
||||
className="flex h-screen w-screen items-center justify-center bg-neutral-50 dark:bg-neutral-950"
|
||||
>
|
||||
<div className="flex flex-col items-center justify-center gap-6">
|
||||
<LoaderIcon className="h-6 w-6 animate-spin text-neutral-950 dark:text-neutral-50" />
|
||||
<h3 className="text-lg font-medium leading-none text-neutral-950 dark:text-neutral-50">
|
||||
Connecting...
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<NDKContext.Provider
|
||||
value={{
|
||||
|
||||
Reference in New Issue
Block a user