update settings page

This commit is contained in:
Ren Amamiya
2023-07-03 11:49:49 +07:00
parent d35c64e28d
commit 6f29df112b
21 changed files with 440 additions and 40 deletions

View File

@@ -8,7 +8,8 @@ export function VideoPreview({ urls }: { urls: string[] }) {
key={url}
url={url}
width="100%"
className="w-full h-auto border border-zinc-800/50 rounded-lg"
height="auto"
className="!h-auto object-fill rounded-lg overflow-hidden"
controls={true}
pip={true}
/>

View File

@@ -1,11 +1,13 @@
import { initNDK } from "@libs/ndk";
import { getSetting } from "@libs/storage";
import NDK from "@nostr-dev-kit/ndk";
import { FULL_RELAYS } from "@stores/constants";
import { createContext } from "react";
export const RelayContext = createContext<NDK>(null);
const ndk = await initNDK(FULL_RELAYS);
const relays = await getSetting("relays");
const relaysArray = JSON.parse(relays);
const ndk = await initNDK(relaysArray);
export function RelayProvider({ children }: { children: React.ReactNode }) {
return <RelayContext.Provider value={ndk}>{children}</RelayContext.Provider>;

View File

@@ -49,17 +49,6 @@ export function SettingsLayout() {
>
<span className="font-medium">Account</span>
</NavLink>
<NavLink
to="/settings/update"
className={({ isActive }) =>
twMerge(
"flex h-9 items-center gap-2.5 rounded-md px-2.5 text-zinc-200",
isActive ? "bg-zinc-900/50" : "",
)
}
>
<span className="font-medium">Update</span>
</NavLink>
</div>
</div>
</div>