From 2937b3e96e6f6e07c44eed9e2bdef7309e5d7dce Mon Sep 17 00:00:00 2001 From: MikkelHansenAbtion Date: Thu, 21 Nov 2024 13:38:10 +0100 Subject: [PATCH] CodeInput: fix text & Story --- components/CodeInput/index.tsx | 8 +++----- stories/components/CodeInput.stories.tsx | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/components/CodeInput/index.tsx b/components/CodeInput/index.tsx index 4b791c94..7253a84c 100644 --- a/components/CodeInput/index.tsx +++ b/components/CodeInput/index.tsx @@ -82,9 +82,7 @@ export const CodeInput = forwardRef( signal: abortController.signal, }) .then((otp) => { - if (otp) { - setCode(otp.code.split("")) - } + if (otp) setCode(otp.code.split("")) }) .catch((error) => { if (error?.message === "Aborted") return @@ -113,7 +111,7 @@ export const CodeInput = forwardRef( Write your code - code delivered by{" "} + Code delivered by{" "} {`${deliveryMethod === "SMS" ? "sms" : "e-mail"}`} @@ -139,7 +137,7 @@ export const CodeInput = forwardRef( - Kode sendt via {`${deliveryMethod === "SMS" ? "sms" : "e-mail"}`} + Code delivered by {`${deliveryMethod === "SMS" ? "sms" : "e-mail"}`} ) diff --git a/stories/components/CodeInput.stories.tsx b/stories/components/CodeInput.stories.tsx index ed5e39d6..ecd20f89 100644 --- a/stories/components/CodeInput.stories.tsx +++ b/stories/components/CodeInput.stories.tsx @@ -1,5 +1,5 @@ import { type Meta, type StoryObj } from "@storybook/react" -import CodeInput from "~/components/CodeInput" +import { CodeInput } from "~/components/CodeInput" const meta = { title: "Toolbox/CodeInput",