diff --git a/apps/app/components/core/list-view/single-list.tsx b/apps/app/components/core/list-view/single-list.tsx index cc2bd99d7..4827970b2 100644 --- a/apps/app/components/core/list-view/single-list.tsx +++ b/apps/app/components/core/list-view/single-list.tsx @@ -112,13 +112,13 @@ export const SingleList: React.FC = ({
{selectedGroup !== null && selectedGroup === "state" ? ( - {currentState && getStateGroupIcon(currentState.group, "20", "20", bgColor)} + {currentState && getStateGroupIcon(currentState.group, "16", "16", bgColor)} ) : ( "" )} {selectedGroup !== null ? ( -

+

{getGroupTitle()}

) : ( @@ -142,9 +142,9 @@ export const SingleList: React.FC = ({ ) : ( +
- +
} optionsPosition="right" noBorder diff --git a/apps/app/components/pages/create-update-page-modal.tsx b/apps/app/components/pages/create-update-page-modal.tsx index ed12f8f46..d1d0d02be 100644 --- a/apps/app/components/pages/create-update-page-modal.tsx +++ b/apps/app/components/pages/create-update-page-modal.tsx @@ -63,6 +63,8 @@ export const CreateUpdatePageModal: React.FC = ({ isOpen, handleClose, da ); onClose(); + router.push(`/${workspaceSlug}/projects/${projectId}/pages/${res.id}`); + setToastAlert({ type: "success", title: "Success!", diff --git a/apps/app/components/pages/pages-list/recent-pages-list.tsx b/apps/app/components/pages/pages-list/recent-pages-list.tsx index f40f17964..16d5330a4 100644 --- a/apps/app/components/pages/pages-list/recent-pages-list.tsx +++ b/apps/app/components/pages/pages-list/recent-pages-list.tsx @@ -9,7 +9,9 @@ import pagesService from "services/pages.service"; // components import { PagesView } from "components/pages"; // ui -import { Loader } from "components/ui"; +import { EmptyState, Loader } from "components/ui"; +// images +import emptyPage from "public/empty-state/empty-page.svg"; // helpers import { replaceUnderscoreIfSnakeCase } from "helpers/string.helper"; // types @@ -29,10 +31,12 @@ export const RecentPagesList: React.FC = ({ viewType }) => { : null ); + const isEmpty = pages && Object.keys(pages).every((key) => pages[key].length === 0); + return ( <> {pages ? ( - Object.keys(pages).length > 0 ? ( + Object.keys(pages).length > 0 && !isEmpty ? (
{Object.keys(pages).map((key) => { if (pages[key].length === 0) return null; @@ -48,7 +52,14 @@ export const RecentPagesList: React.FC = ({ viewType }) => { })}
) : ( -

No issues found

+
+ +
) ) : ( diff --git a/apps/app/components/pages/pages-view.tsx b/apps/app/components/pages/pages-view.tsx index e8b483016..aca7ef648 100644 --- a/apps/app/components/pages/pages-view.tsx +++ b/apps/app/components/pages/pages-view.tsx @@ -210,8 +210,7 @@ export const PagesView: React.FC = ({ pages, viewType }) => { ) diff --git a/apps/app/pages/[workspaceSlug]/projects/[projectId]/pages/index.tsx b/apps/app/pages/[workspaceSlug]/projects/[projectId]/pages/index.tsx index b8ff04572..ca12e9143 100644 --- a/apps/app/pages/[workspaceSlug]/projects/[projectId]/pages/index.tsx +++ b/apps/app/pages/[workspaceSlug]/projects/[projectId]/pages/index.tsx @@ -27,7 +27,7 @@ import { RecentPagesList, CreateUpdatePageModal, TPagesListProps } from "compone import { Input, PrimaryButton } from "components/ui"; import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; // icons -import { ListBulletIcon, RectangleGroupIcon } from "@heroicons/react/20/solid"; +import { ListBulletIcon, RectangleGroupIcon, Squares2X2Icon } from "@heroicons/react/20/solid"; // types import { IPage, TPageViewProps, UserAuth } from "types"; // fetch-keys @@ -115,6 +115,7 @@ const ProjectPages: NextPage = (props) => { title: "Success!", message: "Page created successfully.", }); + router.push(`/${workspaceSlug}/projects/${projectId}/pages/${res.id}`); reset(); mutate(RECENT_PAGES_LIST(projectId as string)); @@ -222,7 +223,7 @@ const ProjectPages: NextPage = (props) => { > - {/* */} - + */}