mirror of
https://github.com/logos-storage/logos-storage-marketplace-ui.git
synced 2026-01-11 01:43:09 +00:00
28 lines
572 B
TypeScript
28 lines
572 B
TypeScript
import { AvailabilityComponentProps } from "./types";
|
|
import { useEffect } from "react";
|
|
import { ErrorPlaceholder } from "../ErrorPlaceholder/ErrorPlaceholder";
|
|
|
|
export function AvailabilityError({
|
|
dispatch,
|
|
error,
|
|
}: AvailabilityComponentProps) {
|
|
useEffect(() => {
|
|
dispatch({
|
|
type: "toggle-next",
|
|
isNextEnable: false,
|
|
});
|
|
|
|
dispatch({
|
|
type: "toggle-back",
|
|
isBackEnable: true,
|
|
});
|
|
}, [dispatch]);
|
|
|
|
return (
|
|
<ErrorPlaceholder
|
|
subtitle="Error when trying to create availability."
|
|
error={error}
|
|
/>
|
|
);
|
|
}
|