pages/index: pass error text to CRMError
This commit is contained in:
parent
5553166788
commit
bf18d52a97
@ -8,6 +8,13 @@ function handleRetry() {
|
||||
|
||||
const RetryButton = <Button action={handleRetry} text="Попробовать еще раз" />;
|
||||
|
||||
export function CRMError() {
|
||||
return <Result status="500" title="500" subTitle="Ошибка соединения с CRM" extra={RetryButton} />;
|
||||
export function CRMError({ error }) {
|
||||
return (
|
||||
<Result
|
||||
status="500"
|
||||
title="CRM не отвечает. Попробуйте позже."
|
||||
subTitle={`${error || ''}`}
|
||||
extra={RetryButton}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ function Home({ error }) {
|
||||
useInsuranceData();
|
||||
useReactions();
|
||||
|
||||
if (error) return <CRMError />;
|
||||
if (error) return <CRMError error={error} />;
|
||||
|
||||
return (
|
||||
<Grid>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user