Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

fix: production fix for examples key inside crypto_estimations #280

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type TSchemaBodyHeader = {
title: string;
is_open_object: boolean;
setIsOpenObject: (boolean) => void;
examples: string[];
examples: string[] | number;
enum;
is_stream_types: boolean;
items_type?: string;
Expand Down Expand Up @@ -144,13 +144,15 @@ const SchemaBodyHeader = ({
{examples && (
<div className={styles.defaultValue}>
<span className={styles.defaultValueLabel}>example: </span>
{examples.map((el: string, i: number) => {
return (
{Array.isArray(examples) ? (
examples.map((el: string, i: number) => (
<div key={i}>
<span className={styles.schemaDefaultValue}>{el}</span>
</div>
);
})}
))
) : (
<span className={styles.schemaDefaultValue}>{examples}</span>
)}
</div>
)}
</div>
Expand Down