wip: fix light mode

This commit is contained in:
2023-10-13 08:35:07 +07:00
parent 35650a40f2
commit 893663561d
25 changed files with 66 additions and 165 deletions

View File

@@ -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={{