import React from "react"; // components import { PagesView } from "components/pages"; // ui import { Loader } from "components/ui"; // helpers import { replaceUnderscoreIfSnakeCase } from "helpers/string.helper"; // types import { RecentPagesResponse, TPageViewProps } from "types"; type Props = { pages: RecentPagesResponse | undefined; viewType: TPageViewProps; }; export const RecentPagesList: React.FC = ({ pages, viewType }) => ( <> {pages ? ( Object.keys(pages).length > 0 ? (
{Object.keys(pages).map((key) => { if (pages[key].length === 0) return null; return (

{replaceUnderscoreIfSnakeCase(key)}

); })}
) : (

No issues found

) ) : ( )} );