From 415545e5f46167592a39e5daace1e956f5f9593b Mon Sep 17 00:00:00 2001 From: Kevin Tun Date: Thu, 29 Feb 2024 14:10:01 -0600 Subject: [PATCH] fix(pages): change EditView component to EditEditor, EditableView to EditableEditor, ContentView to ContentEditor These components have been swapped to versions without any layout stylings. The previously used components were wrapped in Containers that had stylings for margins. In the context of DSC landing page, these margins are not necessary and detracted from the appearance of the editable content. --- apps/stock-center/src/pages/index/edit.tsx | 4 ++-- apps/stock-center/src/pages/index/editable.tsx | 8 ++++++-- apps/stock-center/src/pages/index/index.tsx | 4 ++-- apps/stock-center/src/pages/index/show.tsx | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/apps/stock-center/src/pages/index/edit.tsx b/apps/stock-center/src/pages/index/edit.tsx index 91dccdaf91..ecefe16f01 100644 --- a/apps/stock-center/src/pages/index/edit.tsx +++ b/apps/stock-center/src/pages/index/edit.tsx @@ -7,7 +7,7 @@ import { CatalogLinks, FileLinks, } from "@dictybase/ui-dsc" -import { EditView, LoadingDisplay, OtherError } from "@dictybase/ui-common" +import { EditEditor, LoadingDisplay, OtherError } from "@dictybase/ui-common" import { useContentBySlugQuery } from "dicty-graphql-schema" import { match, P } from "ts-pattern" import { ACCESS, useTokenAndUser } from "auth" @@ -33,7 +33,7 @@ const EditHomepage = () => { .with( { data: { contentBySlug: P.select({ content: P.string }) } }, (content) => ( - { {match(result) .with( { data: { contentBySlug: P.select({ content: P.string }) } }, - (content) => , + (content) => , ) .with({ loading: true }, () => ) .with({ error: P.not(undefined) }, () => ) diff --git a/apps/stock-center/src/pages/index/index.tsx b/apps/stock-center/src/pages/index/index.tsx index db37d47a2f..ad993046d0 100644 --- a/apps/stock-center/src/pages/index/index.tsx +++ b/apps/stock-center/src/pages/index/index.tsx @@ -7,7 +7,7 @@ import { CatalogLinks, FileLinks, } from "@dictybase/ui-dsc" -import { ContentView, LoadingDisplay, OtherError } from "@dictybase/ui-common" +import { LoadingDisplay, OtherError, ContentEditor } from "@dictybase/ui-common" import { useContentBySlugQuery } from "dicty-graphql-schema" import { match, P } from "ts-pattern" import { ACCESS } from "auth" @@ -31,7 +31,7 @@ const ShowHomepage = () => { {match(result) .with( { data: { contentBySlug: P.select({ content: P.string }) } }, - (content) => , + (content) => , ) .with({ loading: true }, () => ) .with({ error: P.not(undefined) }, () => ) diff --git a/apps/stock-center/src/pages/index/show.tsx b/apps/stock-center/src/pages/index/show.tsx index db37d47a2f..ad993046d0 100644 --- a/apps/stock-center/src/pages/index/show.tsx +++ b/apps/stock-center/src/pages/index/show.tsx @@ -7,7 +7,7 @@ import { CatalogLinks, FileLinks, } from "@dictybase/ui-dsc" -import { ContentView, LoadingDisplay, OtherError } from "@dictybase/ui-common" +import { LoadingDisplay, OtherError, ContentEditor } from "@dictybase/ui-common" import { useContentBySlugQuery } from "dicty-graphql-schema" import { match, P } from "ts-pattern" import { ACCESS } from "auth" @@ -31,7 +31,7 @@ const ShowHomepage = () => { {match(result) .with( { data: { contentBySlug: P.select({ content: P.string }) } }, - (content) => , + (content) => , ) .with({ loading: true }, () => ) .with({ error: P.not(undefined) }, () => )