From 17fe5e432260118ebd32dc953adc07f567739d3d Mon Sep 17 00:00:00 2001 From: Nick Winters Date: Sun, 10 Nov 2024 20:01:49 -0800 Subject: [PATCH] new site toggle --- app/db/collections/sites/site-config.ts | 6 ++++++ app/routes/_site+/_components/Column-1-Menu.tsx | 2 +- app/routes/_site+/_utils/fetchSite.server.ts | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/db/collections/sites/site-config.ts b/app/db/collections/sites/site-config.ts index 051c4769..d0703759 100644 --- a/app/db/collections/sites/site-config.ts +++ b/app/db/collections/sites/site-config.ts @@ -36,6 +36,12 @@ export const Sites: CollectionConfig = { label: "Public", defaultValue: false, }, + { + name: "hideNewSiteButton", + type: "checkbox", + label: "Hide New Site Button", + defaultValue: false, + }, { name: "enableAds", type: "checkbox", diff --git a/app/routes/_site+/_components/Column-1-Menu.tsx b/app/routes/_site+/_components/Column-1-Menu.tsx index 63fdca6f..28f5e60a 100644 --- a/app/routes/_site+/_components/Column-1-Menu.tsx +++ b/app/routes/_site+/_components/Column-1-Menu.tsx @@ -101,7 +101,7 @@ export function ColumnOneMenu({ site }: { site?: Site }) { )} - + {!site?.hideNewSiteButton && }
diff --git a/app/routes/_site+/_utils/fetchSite.server.ts b/app/routes/_site+/_utils/fetchSite.server.ts index 0b92748a..53c60e14 100644 --- a/app/routes/_site+/_utils/fetchSite.server.ts +++ b/app/routes/_site+/_utils/fetchSite.server.ts @@ -104,6 +104,7 @@ const QUERY = gql` trendingPages isWhiteLabel logoURL + hideNewSiteButton announcementMessage announcementLink partnerSites {