fix(order-form): hide next button on success & error pages
This commit is contained in:
parent
ad589e471c
commit
f9e50972cd
@ -27,13 +27,17 @@ function getStepComponent(step: string) {
|
||||
return STEP_COMPONENTS[step] ?? null;
|
||||
}
|
||||
|
||||
const BUTTON_COMPONENTS: Record<string, JSX.Element> = {
|
||||
'': <NextButton />,
|
||||
const BUTTON_COMPONENTS: Record<string, JSX.Element | null> = {
|
||||
'client-select': <NextButton />,
|
||||
'datetime-select': <SubmitButton />,
|
||||
error: null,
|
||||
'master-select': <NextButton />,
|
||||
'service-select': <NextButton />,
|
||||
success: null,
|
||||
};
|
||||
|
||||
function getButtonComponent(step: string) {
|
||||
return BUTTON_COMPONENTS[step] ?? <NextButton />;
|
||||
return BUTTON_COMPONENTS[step];
|
||||
}
|
||||
|
||||
export const OrderForm = withContext(OrderStoreProvider)(function () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user