Skip to content

Commit

Permalink
fix nesting error
Browse files Browse the repository at this point in the history
  • Loading branch information
antheas committed Dec 4, 2024
1 parent 3b25f88 commit b821d11
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/elements/SettingComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,15 @@ const DisplayComponent: FC<SettingProps> = ({ settings: set, path }) => {
if (typeof state === "string") {
const lines = state.split("\n");
state = lines.map((line, index) => (
<Text key={index}>
{bold ? <b>{line}</b> : line}
</Text>
<Text key={index}>{bold ? <b>{line}</b> : line}</Text>
));
} else {
if (bold) {
state = <b>{state}</b>;
state = (
<Text>
<b>{state}</b>
</Text>
);
}
state = <Text>{state}</Text>;
}
Expand All @@ -243,7 +245,7 @@ const DisplayComponent: FC<SettingProps> = ({ settings: set, path }) => {
{...(error && { colorScheme: "red" })}
>
<Text as="b">{title}:</Text>
<Text>{state}</Text>
{state}
</Flex>
</Code>
);
Expand Down

0 comments on commit b821d11

Please sign in to comment.