toast
This commit is contained in:
@@ -8,7 +8,7 @@ type CommonErrorProps = FallbackProps & {
|
||||
height?: number;
|
||||
};
|
||||
export const APIError = ({ error, resetErrorBoundary }: CommonErrorProps) => {
|
||||
const { navigateBack } = useNavigate();
|
||||
const { reload } = useNavigate();
|
||||
const msg = useMemo(() => {
|
||||
let message: Partial<DialogProps> = {
|
||||
title: '일시적인 오류가 발생하였습니다.',
|
||||
@@ -21,7 +21,7 @@ export const APIError = ({ error, resetErrorBoundary }: CommonErrorProps) => {
|
||||
}, [error]);
|
||||
|
||||
const handleCancel = () => {
|
||||
navigateBack();
|
||||
reload();
|
||||
resetErrorBoundary();
|
||||
};
|
||||
|
||||
@@ -30,8 +30,8 @@ export const APIError = ({ error, resetErrorBoundary }: CommonErrorProps) => {
|
||||
afterLeave={() => null}
|
||||
open={true}
|
||||
onClose={() => null}
|
||||
onConfirmClick={resetErrorBoundary}
|
||||
onCancelClick={handleCancel}
|
||||
onConfirmClick={ resetErrorBoundary }
|
||||
onCancelClick={ handleCancel }
|
||||
message={msg.message}
|
||||
buttonLabel={['취소', '재시도']}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user