chore: imroved mobile readability

This commit is contained in:
hsjobeki 2023-01-08 17:56:00 +01:00
parent 33b63889fc
commit 52b00c52a9
2 changed files with 5 additions and 5 deletions

View File

@ -48,7 +48,7 @@ export default function FunctionItem(props: FunctionItemProps) {
return s.split(" ").filter(Boolean).slice(0, 10).join(" ");
};
if (typeof description === "object") {
const singleString = description.join("");
const singleString = description?.join("") || "";
return getFirstWords(singleString);
} else if (description) {
return getFirstWords(description);
@ -84,7 +84,7 @@ export default function FunctionItem(props: FunctionItemProps) {
cursor: !selected ? "pointer" : "default",
display: "flex",
justifyContent: "left",
px: selected ? 0 : { xs: 0, md: 2 },
px: selected ? 0 : { xs: 0.8, md: 2 },
pt: 1,
mb: 0,
color: selected ? "primary.main" : undefined,

View File

@ -12,9 +12,9 @@ export type DocItem = {
id: string;
category: string;
name: string;
fn_type?: string;
description?: string | string[];
example?: string | string[];
fn_type?: null | string;
description?: null | string | string[];
example?: null | string | string[];
};
export type MetaData = DocItem[];