From b3a9c2a449cabf2a3674f3a7da33b293b5582780 Mon Sep 17 00:00:00 2001 From: Diner <ismail.diner@gmail.com> Date: Thu, 19 Dec 2024 23:50:33 +0000 Subject: [PATCH] Minor styling improvements --- app/admin/[slug]/page.tsx | 2 +- app/admin/new-listing/page.tsx | 4 +-- components/admin/listing-form/ListingForm.tsx | 2 +- components/header/Header.tsx | 26 ++++++++++--------- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/app/admin/[slug]/page.tsx b/app/admin/[slug]/page.tsx index 27bd5e9e..13ba840d 100644 --- a/app/admin/[slug]/page.tsx +++ b/app/admin/[slug]/page.tsx @@ -55,7 +55,7 @@ export default function ListingPage({ params }) { return ( <Box px={{ - base: '4', + base: 0, md: '10', }} py={4} diff --git a/app/admin/new-listing/page.tsx b/app/admin/new-listing/page.tsx index ac3e3231..3ef2579a 100644 --- a/app/admin/new-listing/page.tsx +++ b/app/admin/new-listing/page.tsx @@ -39,11 +39,11 @@ export default function NewListingPage() { return ( <Box px={{ - base: '4', + base: 0, md: '10', }} py={4} - maxWidth="3xl" + maxWidth="5xl" mx="auto" > <Button diff --git a/components/admin/listing-form/ListingForm.tsx b/components/admin/listing-form/ListingForm.tsx index 2b8d2436..83906e65 100644 --- a/components/admin/listing-form/ListingForm.tsx +++ b/components/admin/listing-form/ListingForm.tsx @@ -220,7 +220,7 @@ const ListingForm = ({ categories, listing, handleSubmit }: Props) => { {(props) => { return ( <Form encType="multipart/form-data"> - <chakra.div p={{ sm: 6 }} px={4} py="1rem"> + <chakra.div p={{ sm: 6 }} px="1rem" py="1rem"> <chakra.div mb="0.5rem"> <Field name="title" validate={fieldRequiredValidator}> {({ field, form }: FieldProps) => ( diff --git a/components/header/Header.tsx b/components/header/Header.tsx index de5de0a3..a1f3bc2d 100644 --- a/components/header/Header.tsx +++ b/components/header/Header.tsx @@ -130,18 +130,20 @@ const Header = ({ value={selectedCategories} /> </InputGroup> - <InputGroup> - <Select - isMulti - isSearchable={false} - menuPortalTarget={document.body} - onChange={handleTagSelection} - options={tags} - placeholder="Filter by tag" - styles={customMultiSelectStyles} - value={selectedTags} - /> - </InputGroup> + {tags.length > 0 && ( + <InputGroup> + <Select + isMulti + isSearchable={false} + menuPortalTarget={document.body} + onChange={handleTagSelection} + options={tags} + placeholder="Filter by tag" + styles={customMultiSelectStyles} + value={selectedTags} + /> + </InputGroup> + )} </VStack> </chakra.div> </Flex>