clean up
This commit is contained in:
14
package.json
14
package.json
@@ -20,7 +20,7 @@
|
|||||||
"@radix-ui/react-icons": "^1.3.0",
|
"@radix-ui/react-icons": "^1.3.0",
|
||||||
"@radix-ui/react-popover": "^1.0.5",
|
"@radix-ui/react-popover": "^1.0.5",
|
||||||
"@radix-ui/react-tabs": "^1.0.3",
|
"@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/query-core": "^4.27.0",
|
||||||
"@tanstack/react-query": "^4.28.0",
|
"@tanstack/react-query": "^4.28.0",
|
||||||
"@tanstack/react-virtual": "3.0.0-beta.54",
|
"@tanstack/react-virtual": "3.0.0-beta.54",
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
"nostr-tools": "^1.8.1",
|
"nostr-tools": "^1.8.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^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-player": "^2.12.0",
|
||||||
"react-string-replace": "^1.1.0",
|
"react-string-replace": "^1.1.0",
|
||||||
"react-virtuoso": "^4.1.1",
|
"react-virtuoso": "^4.1.1",
|
||||||
@@ -51,14 +51,14 @@
|
|||||||
"@tailwindcss/typography": "^0.5.9",
|
"@tailwindcss/typography": "^0.5.9",
|
||||||
"@tauri-apps/cli": "^1.2.3",
|
"@tauri-apps/cli": "^1.2.3",
|
||||||
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
|
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
|
||||||
"@types/node": "^18.15.10",
|
"@types/node": "^18.15.11",
|
||||||
"@types/react": "^18.0.30",
|
"@types/react": "^18.0.31",
|
||||||
"@types/react-dom": "^18.0.11",
|
"@types/react-dom": "^18.0.11",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.57.0",
|
"@typescript-eslint/eslint-plugin": "^5.57.0",
|
||||||
"@typescript-eslint/parser": "^5.57.0",
|
"@typescript-eslint/parser": "^5.57.0",
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.14",
|
||||||
"csstype": "^3.1.1",
|
"csstype": "^3.1.1",
|
||||||
"eslint": "^8.36.0",
|
"eslint": "^8.37.0",
|
||||||
"eslint-config-next": "^13.2.4",
|
"eslint-config-next": "^13.2.4",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
"eslint-config-prettier": "^8.8.0",
|
||||||
"eslint-plugin-react": "^7.32.2",
|
"eslint-plugin-react": "^7.32.2",
|
||||||
@@ -67,9 +67,9 @@
|
|||||||
"lint-staged": "^13.2.0",
|
"lint-staged": "^13.2.0",
|
||||||
"postcss": "^8.4.21",
|
"postcss": "^8.4.21",
|
||||||
"prettier": "^2.8.7",
|
"prettier": "^2.8.7",
|
||||||
"prettier-plugin-tailwindcss": "^0.2.5",
|
"prettier-plugin-tailwindcss": "^0.2.6",
|
||||||
"prop-types": "^15.8.1",
|
"prop-types": "^15.8.1",
|
||||||
"tailwindcss": "^3.2.7",
|
"tailwindcss": "^3.3.1",
|
||||||
"typescript": "^4.9.5"
|
"typescript": "^4.9.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
408
pnpm-lock.yaml
generated
408
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -20,7 +20,7 @@ export default function AccountColumn() {
|
|||||||
}, [getAppVersion]);
|
}, [getAppVersion]);
|
||||||
|
|
||||||
return (
|
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">
|
<div className="flex flex-col gap-4">
|
||||||
<Link
|
<Link
|
||||||
href="/explore"
|
href="/explore"
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export const NoteBase = memo(function NoteBase({ event }: { event: any }) {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
onClick={(e) => openThread(e)}
|
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}</>
|
<>{getParent}</>
|
||||||
<div className="relative z-10 flex flex-col">
|
<div className="relative z-10 flex flex-col">
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ export default function WithSidebarLayout({ children }: { children: React.ReactN
|
|||||||
</div>
|
</div>
|
||||||
<div className="relative flex min-h-0 w-full flex-1">
|
<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="relative w-[68px] shrink-0 border-r border-zinc-900">
|
||||||
<div className="absolute top-0 left-0 h-12 w-full" />
|
|
||||||
<AccountColumn />
|
<AccountColumn />
|
||||||
</div>
|
</div>
|
||||||
<div className="grid w-full grid-cols-4 xl:grid-cols-5">
|
<div className="grid w-full grid-cols-4 xl:grid-cols-5">
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import RelayProvider from '@components/relaysProvider';
|
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 { NextPage } from 'next';
|
||||||
import type { AppProps } from 'next/app';
|
import type { AppProps } from 'next/app';
|
||||||
import { ReactElement, ReactNode } from 'react';
|
import { ReactElement, ReactNode } from 'react';
|
||||||
@@ -19,24 +15,9 @@ type AppPropsWithLayout = AppProps & {
|
|||||||
Component: NextPageWithLayout;
|
Component: NextPageWithLayout;
|
||||||
};
|
};
|
||||||
|
|
||||||
const queryClient = new QueryClient();
|
|
||||||
|
|
||||||
const HydrateAtoms = ({ children }) => {
|
|
||||||
useHydrateAtoms([[queryClientAtom, queryClient]]);
|
|
||||||
return children;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default function MyApp({ Component, pageProps }: AppPropsWithLayout) {
|
export default function MyApp({ Component, pageProps }: AppPropsWithLayout) {
|
||||||
// Use the layout defined at the page level, if available
|
// Use the layout defined at the page level, if available
|
||||||
const getLayout = Component.getLayout ?? ((page) => page);
|
const getLayout = Component.getLayout ?? ((page) => page);
|
||||||
|
|
||||||
return (
|
return <RelayProvider>{getLayout(<Component {...pageProps} />)}</RelayProvider>;
|
||||||
<QueryClientProvider client={queryClient}>
|
|
||||||
<Provider>
|
|
||||||
<HydrateAtoms>
|
|
||||||
<RelayProvider>{getLayout(<Component {...pageProps} />)}</RelayProvider>
|
|
||||||
</HydrateAtoms>
|
|
||||||
</Provider>
|
|
||||||
</QueryClientProvider>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ export default function Page() {
|
|||||||
getAccounts()
|
getAccounts()
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (res.length > 0) {
|
if (res.length > 0) {
|
||||||
router.push('/init');
|
router.replace('/init');
|
||||||
} else {
|
} else {
|
||||||
router.push('/onboarding');
|
router.replace('/onboarding');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(console.error);
|
.catch(console.error);
|
||||||
@@ -25,14 +25,14 @@ export default function Page() {
|
|||||||
return (
|
return (
|
||||||
<div className="relative h-full overflow-hidden">
|
<div className="relative h-full overflow-hidden">
|
||||||
{/* dragging area */}
|
{/* 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 */}
|
{/* end dragging area */}
|
||||||
<div className="relative flex h-full flex-col items-center justify-center">
|
<div className="relative flex h-full flex-col items-center justify-center">
|
||||||
<div className="flex flex-col items-center gap-2">
|
<div className="flex flex-col items-center gap-2">
|
||||||
<LumeSymbol className="h-16 w-16 text-black dark:text-white" />
|
<LumeSymbol className="h-16 w-16 text-black dark:text-white" />
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
<h3 className="text-lg font-semibold leading-tight text-zinc-900 dark:text-zinc-100">
|
<h3 className="text-lg font-semibold leading-tight text-zinc-900 dark:text-zinc-100">
|
||||||
Here's an interesting fact:
|
Here's an interesting fact:
|
||||||
</h3>
|
</h3>
|
||||||
<p className="font-medium text-zinc-300 dark:text-zinc-600">
|
<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!
|
Bitcoin and Nostr can be used by anyone, and no one can stop you!
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export default function Page() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
router.push('/newsfeed/following');
|
router.replace('/newsfeed/following');
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export default function Page() {
|
|||||||
return (
|
return (
|
||||||
<div className="relative h-full w-full">
|
<div className="relative h-full w-full">
|
||||||
{hasNewerNote && (
|
{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
|
<button
|
||||||
onClick={() => loadLatest()}
|
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"
|
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"
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ export default function Page() {
|
|||||||
if (res === 'ok') {
|
if (res === 'ok') {
|
||||||
// publish to relays
|
// publish to relays
|
||||||
pool.publish(event, relays);
|
pool.publish(event, relays);
|
||||||
router.push('/');
|
router.replace('/');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(console.error);
|
.catch(console.error);
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export default function Page() {
|
|||||||
|
|
||||||
// submit then redirect to home
|
// submit then redirect to home
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
router.push('/');
|
router.replace('/');
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user