mirror of
https://github.com/logos-storage/logos-storage-marketplace-ui.git
synced 2026-05-05 17:09:24 +00:00
Merge branch 'add-availability'
This commit is contained in:
commit
badf370f18
@ -1,23 +1,11 @@
|
||||
import {
|
||||
Placeholder,
|
||||
StepperAction,
|
||||
} from "@codex-storage/marketplace-ui-components";
|
||||
import { Placeholder } from "@codex-storage/marketplace-ui-components";
|
||||
import { ErrorIcon } from "../ErrorIcon/ErrorIcon";
|
||||
import { Dispatch, useEffect } from "react";
|
||||
|
||||
type Props = {
|
||||
error: Error;
|
||||
dispatch: Dispatch<StepperAction>;
|
||||
};
|
||||
|
||||
export function AvailabilityError({ dispatch, error }: Props) {
|
||||
useEffect(() => {
|
||||
dispatch({
|
||||
isNextEnable: false,
|
||||
type: "toggle-next",
|
||||
});
|
||||
}, [dispatch]);
|
||||
|
||||
export function AvailabilityError({ error }: Props) {
|
||||
return (
|
||||
<Placeholder
|
||||
Icon={<ErrorIcon />}
|
||||
|
||||
@ -65,11 +65,18 @@ export function useAvailabilityMutation(
|
||||
|
||||
setError(error);
|
||||
|
||||
WebStorage.set("availability-step", state.step - 1);
|
||||
|
||||
dispatch({
|
||||
type: "next",
|
||||
step: state.step,
|
||||
isBackEnable: true,
|
||||
});
|
||||
|
||||
dispatch({
|
||||
type: "toggle-next",
|
||||
isNextEnable: false,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user