From 505077a5456e81ca08756c4fdea324dcfca98140 Mon Sep 17 00:00:00 2001 From: Arik Chakma Date: Fri, 10 Nov 2023 03:10:58 +0600 Subject: [PATCH] Fix trigger verify page --- .../TriggerVerifyAccount.tsx | 22 ++------- src/components/PageSponsor.tsx | 6 +-- src/components/ReactIcons/ErrorIcon2.tsx | 48 +++++++++++++++++++ 3 files changed, 56 insertions(+), 20 deletions(-) create mode 100644 src/components/ReactIcons/ErrorIcon2.tsx diff --git a/src/components/AuthenticationFlow/TriggerVerifyAccount.tsx b/src/components/AuthenticationFlow/TriggerVerifyAccount.tsx index 9d54e02ce..e46342a11 100644 --- a/src/components/AuthenticationFlow/TriggerVerifyAccount.tsx +++ b/src/components/AuthenticationFlow/TriggerVerifyAccount.tsx @@ -1,9 +1,9 @@ import { useEffect, useState } from 'react'; import Cookies from 'js-cookie'; import { httpPost } from '../../lib/http'; -import ErrorIcon from '../../icons/error.svg'; -import SpinnerIcon from '../../icons/spinner.svg'; import { TOKEN_COOKIE_NAME } from '../../lib/jwt'; +import { Spinner } from '../ReactIcons/Spinner'; +import { ErrorIcon2 } from '../ReactIcons/ErrorIcon2'; export function TriggerVerifyAccount() { const [isLoading, setIsLoading] = useState(true); @@ -16,7 +16,7 @@ export function TriggerVerifyAccount() { `${import.meta.env.PUBLIC_API_URL}/v1-verify-account`, { code, - } + }, ) .then(({ response, error }) => { if (!response?.token) { @@ -55,20 +55,8 @@ export function TriggerVerifyAccount() { return (
- {isLoading && ( - {'Please - )} - {error && ( - {'Please - )} + {isLoading && } + {error && }

Verifying your account

diff --git a/src/components/PageSponsor.tsx b/src/components/PageSponsor.tsx index c549820d0..fbdc0377d 100644 --- a/src/components/PageSponsor.tsx +++ b/src/components/PageSponsor.tsx @@ -1,8 +1,8 @@ import { useEffect, useState } from 'react'; -import CloseIcon from '../icons/close.svg'; import { httpGet } from '../lib/http'; import { sponsorHidden } from '../stores/page'; import { useStore } from '@nanostores/react'; +import { X } from 'lucide-react'; export type PageSponsorType = { company: string; @@ -46,7 +46,7 @@ export function PageSponsor(props: PageSponsorProps) { `${import.meta.env.PUBLIC_API_URL}/v1-get-sponsor`, { href: window.location.pathname, - } + }, ); if (error) { @@ -101,7 +101,7 @@ export function PageSponsor(props: PageSponsorProps) { sponsorHidden.set(true); }} > - Close + + + + + + + + + + + + + ); +}