From 41901b217434f1e84538ffa0105a2968f1d9d8cf Mon Sep 17 00:00:00 2001 From: Ren Amamiya <123083837+reyamir@users.noreply.github.com> Date: Fri, 8 Sep 2023 17:02:01 +0700 Subject: [PATCH] fix hashtag step in onboarding --- src/app/auth/onboarding/step-2.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/auth/onboarding/step-2.tsx b/src/app/auth/onboarding/step-2.tsx index 77e1e006..2169d6c1 100644 --- a/src/app/auth/onboarding/step-2.tsx +++ b/src/app/auth/onboarding/step-2.tsx @@ -1,3 +1,4 @@ +import { message } from '@tauri-apps/api/dialog'; import { useEffect, useState } from 'react'; import { Link, useNavigate } from 'react-router-dom'; @@ -52,12 +53,12 @@ export function OnboardStep2Screen() { setLoading(true); for (const tag of tags) { - await db.createWidget(WidgetKinds.hashtag, tag, tag.replace('#', '')); + await db.createWidget(WidgetKinds.global.hashtag, tag, tag.replace('#', '')); } navigate('/auth/onboarding/step-3', { replace: true }); - } catch { - console.log('error'); + } catch (e) { + await message(e, { title: 'Error', type: 'error' }); } };