Skip to content

Commit

Permalink
CodeInput: fix text & Story
Browse files Browse the repository at this point in the history
  • Loading branch information
MikkelHansenAbtion committed Nov 21, 2024
1 parent d53ddd7 commit 2937b3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions components/CodeInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ export const CodeInput = forwardRef<HTMLDivElement, CodeInputProps>(
signal: abortController.signal,
})
.then((otp) => {
if (otp) {
setCode(otp.code.split(""))
}
if (otp) setCode(otp.code.split(""))
})
.catch((error) => {
if (error?.message === "Aborted") return
Expand Down Expand Up @@ -113,7 +111,7 @@ export const CodeInput = forwardRef<HTMLDivElement, CodeInputProps>(
Write your code
</span>
<span className="hidden lg:block self-center pl-5 pr-12 text-xs whitespace-nowrap text-neutral-400">
code delivered by{" "}
Code delivered by{" "}
{`${deliveryMethod === "SMS" ? "sms" : "e-mail"}`}
</span>
</div>
Expand All @@ -139,7 +137,7 @@ export const CodeInput = forwardRef<HTMLDivElement, CodeInputProps>(
</div>
</div>
<span className="block lg:hidden self-center text-center my-2 text-xs whitespace-nowrap text-neutral-400">
Kode sendt via {`${deliveryMethod === "SMS" ? "sms" : "e-mail"}`}
Code delivered by {`${deliveryMethod === "SMS" ? "sms" : "e-mail"}`}
</span>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion stories/components/CodeInput.stories.tsx
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 2937b3e

Please sign in to comment.