diff --git a/components/homepage/web-cards/WebCards.tsx b/components/homepage/web-cards/WebCards.tsx index 22fd26dc..91d01772 100644 --- a/components/homepage/web-cards/WebCards.tsx +++ b/components/homepage/web-cards/WebCards.tsx @@ -26,10 +26,16 @@ const WebCards = () => { {webs ?.filter( (web) => - web.published && Boolean(web.image) && web.slug !== 'ctrlshift', + web.published && + Boolean(web.image) && + web.slug !== 'ctrlshift' && + web.slug !== 'transition', ) .sort((a, b) => { - if (orderOnHomepage.includes(a.title) > orderOnHomepage.includes(b.title)) { + if ( + orderOnHomepage.includes(a.title) > + orderOnHomepage.includes(b.title) + ) { return -1 } else { return 1 @@ -97,3 +103,4 @@ const Card = ({ web }) => { + diff --git a/components/nav/Nav.tsx b/components/nav/Nav.tsx index f377de44..6756ad58 100644 --- a/components/nav/Nav.tsx +++ b/components/nav/Nav.tsx @@ -64,7 +64,12 @@ export default function MainNav() { label: 'Webs', href: '#', children: webs - ?.filter((web) => web.published && web.slug !== 'ctrlshift') + ?.filter( + (web) => + web.published && + web.slug !== 'ctrlshift' && + web.slug !== 'transition', + ) .map((web) => ({ label: web.title, href: `${PROTOCOL}://${web.slug}.${REMOTE_HOSTNAME}`, diff --git a/pages/admin/index.tsx b/pages/admin/index.tsx index 2fb23975..b39e7cd2 100644 --- a/pages/admin/index.tsx +++ b/pages/admin/index.tsx @@ -41,7 +41,7 @@ const Admin = () => { if (permissions?.webIds?.includes(selectedWebId)) return listings - return listings.filter((listing) => { + return listings?.filter((listing) => { return permissions?.listingIds?.includes(listing.id) }) }, [ diff --git a/pages/admin/team.tsx b/pages/admin/team.tsx index 187a5222..eb3b77b8 100644 --- a/pages/admin/team.tsx +++ b/pages/admin/team.tsx @@ -25,7 +25,7 @@ import { } from '@chakra-ui/react' import { signIn, useSession } from 'next-auth/react' import LayoutContainer from '@components/admin/layout-container' -import PermissionsList from '@components/admin/permissions-list' +// import PermissionsList from '@components/admin/permissions-list' import PermissionsTable from '@components/admin/permissions-table' import { useListings } from '@hooks/listings' import { emailRequiredValidator } from '@helpers/formValidation' @@ -77,7 +77,9 @@ export default function Invite() { return [] } - return ownerships.map((ownership) => ({ ...ownership, owner: true })) + return ownerships + .filter((ownership) => !ownership.user.admin) + .map((ownership) => ({ ...ownership, owner: true })) }, [ownerships]) const permissionsForCurrentWebWithoutOwners = useMemo(() => { @@ -305,7 +307,7 @@ export default function Invite() { id="web" onChange={field.onChange} > - Give full access to the{' '} + Give Editor access to the{' '} {selectedWebName} web @@ -348,16 +350,16 @@ export default function Invite() { List of people who have permissions to edit some or all the listings on the {selectedWebName} web. - {isOwnerOfCurrentWeb ? ( + {/* {isOwnerOfCurrentWeb ? ( - ) : ( - - )} + ) : ( */} + + {/* )} */} )}