fix(Response): Ajuste de tipagem no componente de resposta
This commit is contained in:
parent
247371c2d4
commit
0f0121d543
2 changed files with 6 additions and 4 deletions
|
|
@ -3,9 +3,11 @@
|
|||
import React, { createContext, useContext, useState, ReactNode } from 'react';
|
||||
|
||||
interface ResponseState {
|
||||
message: string;
|
||||
type: 'toast' | 'modal' | 'alert' | null;
|
||||
status: number;
|
||||
message?: string;
|
||||
type?: 'toast' | 'modal' | 'alert' | null;
|
||||
status?: number;
|
||||
error?: string;
|
||||
detail?: string;
|
||||
}
|
||||
|
||||
interface ResponseContextProps {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export default function Response() {
|
|||
break;
|
||||
|
||||
case 422:
|
||||
toast.danger(response.error, {
|
||||
toast.error(response.error, {
|
||||
description: response.detail
|
||||
});
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue