This commit is contained in:
focp212@naver.com
2025-10-22 14:21:14 +09:00
parent 1e7f13d5cc
commit 556b3f2a6a
27 changed files with 178 additions and 397 deletions

View File

@@ -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={['취소', '재시도']}
/>