diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 1220b122..4449f6c9 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -13,7 +13,7 @@ jobs: run: npm ci - name: Check types - run: npm run typecheck + run: npm run check:types - name: Lint with Biome run: npm run check:code diff --git a/package.json b/package.json index 76af1218..86ed0acd 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,8 @@ "lint:styles:fix": "stylelint **/*.{scss,css} --fix", "preview": "vite preview", "start": "vite", - "typecheck": "tsc --noEmit", - "typecheck:watch": "tsc --noEmit --watch" + "check:types": "tsc --noEmit", + "check:types:watch": "tsc --noEmit --watch" }, "dependencies": { "form-data": "4.0.0", diff --git a/src/components/Nav/AuthModal/LoginForm.tsx b/src/components/Nav/AuthModal/LoginForm.tsx index 83d89917..c7a26d68 100644 --- a/src/components/Nav/AuthModal/LoginForm.tsx +++ b/src/components/Nav/AuthModal/LoginForm.tsx @@ -97,7 +97,12 @@ export const LoginForm = () => { const { errors } = await signIn({ email: email(), password: password() }) console.error('[signIn errors]', errors) if (errors?.length > 0) { - if (errors.some((error) => error.message.includes('bad user credentials'))) { + if ( + errors.some( + (error) => + error.message.includes('bad user credentials') || error.message.includes('user not found'), + ) + ) { setValidationErrors((prev) => ({ ...prev, password: t('Something went wrong, check email and password'), diff --git a/src/components/Nav/AuthModal/SendResetLinkForm.tsx b/src/components/Nav/AuthModal/SendResetLinkForm.tsx index e872cbeb..57f55b6d 100644 --- a/src/components/Nav/AuthModal/SendResetLinkForm.tsx +++ b/src/components/Nav/AuthModal/SendResetLinkForm.tsx @@ -61,7 +61,12 @@ export const SendResetLinkForm = () => { redirect_uri: window.location.origin, }) console.debug('[SendResetLinkForm] authorizer response:', data) - if (errors?.some((error) => error.message.includes('bad user credentials'))) { + if ( + errors?.some( + (error) => + error.message.includes('bad user credentials') || error.message.includes('user not found'), + ) + ) { setIsUserNotFound(true) } if (data.message) setMessage(data.message) diff --git a/src/components/Nav/HeaderAuth.tsx b/src/components/Nav/HeaderAuth.tsx index 5d3cdd31..a0c273fc 100644 --- a/src/components/Nav/HeaderAuth.tsx +++ b/src/components/Nav/HeaderAuth.tsx @@ -57,6 +57,7 @@ export const HeaderAuth = (props: Props) => { toggleEditorPanel() } + // FIXME: use or remove const handleSaveClick = () => { const hasTopics = form.selectedTopics?.length > 0 if (hasTopics) { @@ -110,7 +111,13 @@ export const HeaderAuth = (props: Props) => {