finish restucture

This commit is contained in:
Ren Amamiya 2023-04-27 18:43:13 +07:00
parent b2b5cb50f0
commit 76bdeca4ab
21 changed files with 9 additions and 10 deletions

View File

@ -125,7 +125,7 @@ export function Page() {
() => {
updateLastLogin(dateToUnix(now.current));
timeout = setTimeout(() => {
navigate('/newsfeed/following', { overwriteLastHistoryEntry: true });
navigate('/app/newsfeed/following', { overwriteLastHistoryEntry: true });
}, 5000);
}
);
@ -136,7 +136,7 @@ export function Page() {
if (res) {
fetchInitalData(res, res.follows);
} else {
navigate('/onboarding', { overwriteLastHistoryEntry: true });
navigate('/auth', { overwriteLastHistoryEntry: true });
}
})
.catch(console.error);

View File

@ -26,7 +26,7 @@ export function Page() {
const submit = () => {
setOnboarding((prev) => ({ ...prev, pubkey: pubkey, privkey: privkey }));
navigate('/onboarding/create/step-2');
navigate('/auth/create/step-2');
};
return (

View File

@ -30,7 +30,7 @@ export function Page() {
const onSubmit = (data: any) => {
setLoading(true);
setOnboarding((prev) => ({ ...prev, metadata: data }));
navigate('/onboarding/create/step-3');
navigate('/auth/create/step-3');
};
useEffect(() => {

View File

@ -1,4 +1,4 @@
import User from '@lume/onboarding/components/user';
import User from '@lume/auth/components/user';
import { WRITEONLY_RELAYS } from '@lume/stores/constants';
import { onboardingAtom } from '@lume/stores/onboarding';
import { createAccount, createPleb } from '@lume/utils/storage';

View File

@ -43,7 +43,7 @@ export function Page() {
if (typeof getPublicKey(privkey) === 'string') {
setOnboardingPrivkey((prev) => ({ ...prev, privkey: privkey }));
navigate(`/onboarding/import/step-2`);
navigate(`/auth/import/step-2`);
}
} catch (error) {
setError('key', {

View File

@ -2,7 +2,6 @@ import { DEFAULT_AVATAR, READONLY_RELAYS } from '@lume/stores/constants';
import { onboardingAtom } from '@lume/stores/onboarding';
import { shortenKey } from '@lume/utils/shortenKey';
import { createAccount, createPleb } from '@lume/utils/storage';
import { nip02ToArray } from '@lume/utils/transform';
import { useAtom } from 'jotai';
import { RelayPool } from 'nostr-relaypool';
@ -37,7 +36,7 @@ export function Page() {
setOnboarding((prev) => ({ ...prev, metadata: event.content }));
break;
case 3:
setOnboarding((prev) => ({ ...prev, follows: nip02ToArray(event.tags) }));
setOnboarding((prev) => ({ ...prev, follows: event.tags }));
break;
default:
break;

View File

@ -95,14 +95,14 @@ export function Page() {
</h1>
<div className="mt-4 flex flex-col items-center gap-1.5">
<a
href="/onboarding/create"
href="/auth/create"
className="relative inline-flex h-14 w-64 items-center justify-center gap-2 rounded-full bg-zinc-900 px-6 text-lg font-medium ring-1 ring-zinc-800 hover:bg-zinc-800"
>
Create new key
<ArrowRight width={20} height={20} />
</a>
<a
href="/onboarding/import"
href="/auth/import"
className="inline-flex h-14 w-64 items-center justify-center gap-2 rounded-full px-6 text-base font-medium text-zinc-300 hover:bg-zinc-800"
>
Login with private key