small fixes
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import type { Route } from './+types/orders'
|
import type { Route } from './+types/history'
|
||||||
|
|
||||||
import { MeiliSearchFilterBuilder } from 'meilisearch-helper'
|
import { MeiliSearchFilterBuilder } from 'meilisearch-helper'
|
||||||
import { Await, Link } from 'react-router'
|
import { Await, Link } from 'react-router'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { Route } from './+types'
|
import type { Route } from './+types/index'
|
||||||
|
|
||||||
import Fuse from 'fuse.js'
|
import Fuse from 'fuse.js'
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export async function loader({ params, request, context }: Route.LoaderArgs) {
|
|||||||
if (r.ok) {
|
if (r.ok) {
|
||||||
session.flash('success', 'Seu email foi verificado.')
|
session.flash('success', 'Seu email foi verificado.')
|
||||||
} else {
|
} else {
|
||||||
session.flash('info', 'O email já está verificado.')
|
session.flash('info', 'O email já está verificado anteriormente.')
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect('/settings/emails', {
|
return redirect('/settings/emails', {
|
||||||
|
|||||||
@@ -82,14 +82,9 @@ export default function Route({}: Route.ComponentProps) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (fetcher.data?.ok) {
|
if (fetcher.data?.ok) {
|
||||||
toast.success('A senha foi alterada')
|
toast.success('Sua senha foi alterada.')
|
||||||
return reset()
|
return reset()
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (fetcher.data?.error?.type) {
|
|
||||||
case 'UserConflictError':
|
|
||||||
toast.error('O colaborador já foi vinculado anteriormente')
|
|
||||||
}
|
|
||||||
}, [fetcher.data, reset])
|
}, [fetcher.data, reset])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user