Skip to content

Commit

Permalink
fix: add capitalize and bug
Browse files Browse the repository at this point in the history
  • Loading branch information
evilpeach committed May 28, 2024
1 parent c707356 commit 571f1d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/forms/SelectInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const SelectInput = <T extends string>({
const selectedOption = options.find((item) => item.label === selected);

useEffect(() => {
if (initialSelected) return;
if (!initialSelected) return;

setSelected(
options.find((item) => !item.disabled && item.value === initialSelected)
Expand Down
4 changes: 2 additions & 2 deletions src/lib/pages/interact-contract/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Flex, Heading } from "@chakra-ui/react";
import { isUndefined } from "lodash";
import { capitalize, isUndefined } from "lodash";
import { useRouter } from "next/router";
import { useCallback, useEffect, useState } from "react";

Expand Down Expand Up @@ -137,7 +137,7 @@ const InteractContractBody = ({
/>
<Flex gap={4} align="center" mt={8} mb={4}>
<Heading variant="h6" as="h6" minW={40} mr={2}>
{selectedType} Message
{capitalize(selectedType)} Message
</Heading>
{!isMobile && (
<InteractionTypeSwitch
Expand Down

0 comments on commit 571f1d3

Please sign in to comment.