add notifications screen

This commit is contained in:
Ren Amamiya
2023-08-22 16:34:47 +07:00
parent 4830f0b236
commit 0912948b31
18 changed files with 375 additions and 301 deletions

View File

@@ -18,16 +18,19 @@ export function ImportStep3Screen() {
const [loading, setLoading] = useState(false);
const { db } = useStorage();
const { fetchUserData } = useNostr();
const { fetchUserData, prefetchEvents } = useNostr();
const submit = async () => {
try {
// show loading indicator
setLoading(true);
const data = await fetchUserData();
// prefetch data
const user = await fetchUserData();
const data = await prefetchEvents();
if (data.status === 'ok') {
// redirect to next step
if (user.status === 'ok' && data.status === 'ok') {
navigate('/auth/onboarding/step-2', { replace: true });
} else {
console.log('error: ', data.message);