From fd1b66883a60347ef0f8b3e46cf67de3d980a3f7 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 20 Oct 2020 16:59:29 +0200 Subject: [PATCH] submit view, success view, form submit --- src/components/atoms/SuccessConfetti.tsx | 2 +- .../AssetContent/FormPricing/index.tsx | 4 +- .../organisms/AssetContent/Pricing.module.css | 6 +++ .../organisms/AssetContent/Pricing.tsx | 52 ++++++++++++++++--- .../organisms/AssetContent/index.tsx | 2 +- 5 files changed, 54 insertions(+), 12 deletions(-) diff --git a/src/components/atoms/SuccessConfetti.tsx b/src/components/atoms/SuccessConfetti.tsx index 25d8f7052..4bd47c285 100644 --- a/src/components/atoms/SuccessConfetti.tsx +++ b/src/components/atoms/SuccessConfetti.tsx @@ -28,7 +28,7 @@ export default function SuccessConfetti({ action }: { success: string - action: ReactNode + action?: ReactNode }): ReactElement { // Have some confetti upon success useEffect(() => { diff --git a/src/components/organisms/AssetContent/FormPricing/index.tsx b/src/components/organisms/AssetContent/FormPricing/index.tsx index d1dee6f77..c58d0f2cb 100644 --- a/src/components/organisms/AssetContent/FormPricing/index.tsx +++ b/src/components/organisms/AssetContent/FormPricing/index.tsx @@ -52,7 +52,7 @@ export default function FormPricing({ const content = data.content.edges[0].node.childContentJson.create // Connect with form - const { values, setFieldValue } = useFormikContext() + const { values, setFieldValue, submitForm } = useFormikContext() const { price, weightOnDataToken, type } = values as PriceOptionsMarket // Switch type value upon tab change @@ -87,7 +87,7 @@ export default function FormPricing({ />
-