This commit is contained in:
Ren Amamiya 2023-03-31 15:10:16 +07:00
parent 990bf98571
commit c7e2b9430a
11 changed files with 242 additions and 222 deletions

View File

@ -20,7 +20,7 @@
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-popover": "^1.0.5",
"@radix-ui/react-tabs": "^1.0.3",
"@supabase/supabase-js": "^2.12.1",
"@supabase/supabase-js": "^2.13.0",
"@tanstack/query-core": "^4.27.0",
"@tanstack/react-query": "^4.28.0",
"@tanstack/react-virtual": "3.0.0-beta.54",
@ -39,7 +39,7 @@
"nostr-tools": "^1.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.43.8",
"react-hook-form": "^7.43.9",
"react-player": "^2.12.0",
"react-string-replace": "^1.1.0",
"react-virtuoso": "^4.1.1",
@ -51,14 +51,14 @@
"@tailwindcss/typography": "^0.5.9",
"@tauri-apps/cli": "^1.2.3",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
"@types/node": "^18.15.10",
"@types/react": "^18.0.30",
"@types/node": "^18.15.11",
"@types/react": "^18.0.31",
"@types/react-dom": "^18.0.11",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"autoprefixer": "^10.4.14",
"csstype": "^3.1.1",
"eslint": "^8.36.0",
"eslint": "^8.37.0",
"eslint-config-next": "^13.2.4",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-react": "^7.32.2",
@ -67,9 +67,9 @@
"lint-staged": "^13.2.0",
"postcss": "^8.4.21",
"prettier": "^2.8.7",
"prettier-plugin-tailwindcss": "^0.2.5",
"prettier-plugin-tailwindcss": "^0.2.6",
"prop-types": "^15.8.1",
"tailwindcss": "^3.2.7",
"tailwindcss": "^3.3.1",
"typescript": "^4.9.5"
}
}

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@ export default function AccountColumn() {
}, [getAppVersion]);
return (
<div className="flex h-full flex-col items-center justify-between px-2 pt-4 pb-4">
<div className="flex h-full flex-col items-center justify-between px-2 pb-4 pt-4">
<div className="flex flex-col gap-4">
<Link
href="/explore"

View File

@ -80,7 +80,7 @@ export const NoteBase = memo(function NoteBase({ event }: { event: any }) {
return (
<div
onClick={(e) => openThread(e)}
className="relative z-10 m-0 flex h-min min-h-min w-full select-text flex-col border-b border-zinc-800 py-5 px-3 hover:bg-black/20"
className="relative z-10 m-0 flex h-min min-h-min w-full select-text flex-col border-b border-zinc-800 px-3 py-5 hover:bg-black/20"
>
<>{getParent}</>
<div className="relative z-10 flex flex-col">

View File

@ -13,7 +13,6 @@ export default function WithSidebarLayout({ children }: { children: React.ReactN
</div>
<div className="relative flex min-h-0 w-full flex-1">
<div className="relative w-[68px] shrink-0 border-r border-zinc-900">
<div className="absolute top-0 left-0 h-12 w-full" />
<AccountColumn />
</div>
<div className="grid w-full grid-cols-4 xl:grid-cols-5">

View File

@ -1,9 +1,5 @@
import RelayProvider from '@components/relaysProvider';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { Provider } from 'jotai';
import { queryClientAtom } from 'jotai-tanstack-query';
import { useHydrateAtoms } from 'jotai/react/utils';
import type { NextPage } from 'next';
import type { AppProps } from 'next/app';
import { ReactElement, ReactNode } from 'react';
@ -19,24 +15,9 @@ type AppPropsWithLayout = AppProps & {
Component: NextPageWithLayout;
};
const queryClient = new QueryClient();
const HydrateAtoms = ({ children }) => {
useHydrateAtoms([[queryClientAtom, queryClient]]);
return children;
};
export default function MyApp({ Component, pageProps }: AppPropsWithLayout) {
// Use the layout defined at the page level, if available
const getLayout = Component.getLayout ?? ((page) => page);
return (
<QueryClientProvider client={queryClient}>
<Provider>
<HydrateAtoms>
<RelayProvider>{getLayout(<Component {...pageProps} />)}</RelayProvider>
</HydrateAtoms>
</Provider>
</QueryClientProvider>
);
return <RelayProvider>{getLayout(<Component {...pageProps} />)}</RelayProvider>;
}

View File

@ -14,9 +14,9 @@ export default function Page() {
getAccounts()
.then((res: any) => {
if (res.length > 0) {
router.push('/init');
router.replace('/init');
} else {
router.push('/onboarding');
router.replace('/onboarding');
}
})
.catch(console.error);
@ -25,14 +25,14 @@ export default function Page() {
return (
<div className="relative h-full overflow-hidden">
{/* dragging area */}
<div data-tauri-drag-region className="absolute top-0 left-0 z-20 h-16 w-full bg-transparent" />
<div data-tauri-drag-region className="absolute left-0 top-0 z-20 h-16 w-full bg-transparent" />
{/* end dragging area */}
<div className="relative flex h-full flex-col items-center justify-center">
<div className="flex flex-col items-center gap-2">
<LumeSymbol className="h-16 w-16 text-black dark:text-white" />
<div className="text-center">
<h3 className="text-lg font-semibold leading-tight text-zinc-900 dark:text-zinc-100">
Here's an interesting fact:
Here&apos;s an interesting fact:
</h3>
<p className="font-medium text-zinc-300 dark:text-zinc-600">
Bitcoin and Nostr can be used by anyone, and no one can stop you!

View File

@ -80,7 +80,7 @@ export default function Page() {
}
});
} else {
router.push('/newsfeed/following');
router.replace('/newsfeed/following');
}
return () => {

View File

@ -78,7 +78,7 @@ export default function Page() {
return (
<div className="relative h-full w-full">
{hasNewerNote && (
<div className="absolute top-2 left-1/2 z-50 -translate-x-1/2 transform">
<div className="absolute left-1/2 top-2 z-50 -translate-x-1/2 transform">
<button
onClick={() => loadLatest()}
className="inline-flex h-8 transform items-center justify-center gap-1 rounded-full bg-fuchsia-500 pl-3 pr-3.5 text-sm shadow-md shadow-fuchsia-800/20 active:translate-y-1"

View File

@ -106,7 +106,7 @@ export default function Page() {
if (res === 'ok') {
// publish to relays
pool.publish(event, relays);
router.push('/');
router.replace('/');
}
})
.catch(console.error);

View File

@ -73,7 +73,7 @@ export default function Page() {
// submit then redirect to home
const submit = () => {
router.push('/');
router.replace('/');
};
return (