mirror of
https://github.com/lumehq/lume.git
synced 2025-03-29 03:02:14 +01:00
finish restucture
This commit is contained in:
parent
b2b5cb50f0
commit
76bdeca4ab
@ -125,7 +125,7 @@ export function Page() {
|
|||||||
() => {
|
() => {
|
||||||
updateLastLogin(dateToUnix(now.current));
|
updateLastLogin(dateToUnix(now.current));
|
||||||
timeout = setTimeout(() => {
|
timeout = setTimeout(() => {
|
||||||
navigate('/newsfeed/following', { overwriteLastHistoryEntry: true });
|
navigate('/app/newsfeed/following', { overwriteLastHistoryEntry: true });
|
||||||
}, 5000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -136,7 +136,7 @@ export function Page() {
|
|||||||
if (res) {
|
if (res) {
|
||||||
fetchInitalData(res, res.follows);
|
fetchInitalData(res, res.follows);
|
||||||
} else {
|
} else {
|
||||||
navigate('/onboarding', { overwriteLastHistoryEntry: true });
|
navigate('/auth', { overwriteLastHistoryEntry: true });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(console.error);
|
.catch(console.error);
|
@ -26,7 +26,7 @@ export function Page() {
|
|||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
setOnboarding((prev) => ({ ...prev, pubkey: pubkey, privkey: privkey }));
|
setOnboarding((prev) => ({ ...prev, pubkey: pubkey, privkey: privkey }));
|
||||||
navigate('/onboarding/create/step-2');
|
navigate('/auth/create/step-2');
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
@ -30,7 +30,7 @@ export function Page() {
|
|||||||
const onSubmit = (data: any) => {
|
const onSubmit = (data: any) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
setOnboarding((prev) => ({ ...prev, metadata: data }));
|
setOnboarding((prev) => ({ ...prev, metadata: data }));
|
||||||
navigate('/onboarding/create/step-3');
|
navigate('/auth/create/step-3');
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
@ -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 { WRITEONLY_RELAYS } from '@lume/stores/constants';
|
||||||
import { onboardingAtom } from '@lume/stores/onboarding';
|
import { onboardingAtom } from '@lume/stores/onboarding';
|
||||||
import { createAccount, createPleb } from '@lume/utils/storage';
|
import { createAccount, createPleb } from '@lume/utils/storage';
|
@ -43,7 +43,7 @@ export function Page() {
|
|||||||
|
|
||||||
if (typeof getPublicKey(privkey) === 'string') {
|
if (typeof getPublicKey(privkey) === 'string') {
|
||||||
setOnboardingPrivkey((prev) => ({ ...prev, privkey: privkey }));
|
setOnboardingPrivkey((prev) => ({ ...prev, privkey: privkey }));
|
||||||
navigate(`/onboarding/import/step-2`);
|
navigate(`/auth/import/step-2`);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setError('key', {
|
setError('key', {
|
@ -2,7 +2,6 @@ import { DEFAULT_AVATAR, READONLY_RELAYS } from '@lume/stores/constants';
|
|||||||
import { onboardingAtom } from '@lume/stores/onboarding';
|
import { onboardingAtom } from '@lume/stores/onboarding';
|
||||||
import { shortenKey } from '@lume/utils/shortenKey';
|
import { shortenKey } from '@lume/utils/shortenKey';
|
||||||
import { createAccount, createPleb } from '@lume/utils/storage';
|
import { createAccount, createPleb } from '@lume/utils/storage';
|
||||||
import { nip02ToArray } from '@lume/utils/transform';
|
|
||||||
|
|
||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
import { RelayPool } from 'nostr-relaypool';
|
import { RelayPool } from 'nostr-relaypool';
|
||||||
@ -37,7 +36,7 @@ export function Page() {
|
|||||||
setOnboarding((prev) => ({ ...prev, metadata: event.content }));
|
setOnboarding((prev) => ({ ...prev, metadata: event.content }));
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
setOnboarding((prev) => ({ ...prev, follows: nip02ToArray(event.tags) }));
|
setOnboarding((prev) => ({ ...prev, follows: event.tags }));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
@ -95,14 +95,14 @@ export function Page() {
|
|||||||
</h1>
|
</h1>
|
||||||
<div className="mt-4 flex flex-col items-center gap-1.5">
|
<div className="mt-4 flex flex-col items-center gap-1.5">
|
||||||
<a
|
<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"
|
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
|
Create new key
|
||||||
<ArrowRight width={20} height={20} />
|
<ArrowRight width={20} height={20} />
|
||||||
</a>
|
</a>
|
||||||
<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"
|
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
|
Login with private key
|
Loading…
x
Reference in New Issue
Block a user