Skip to content

Commit

Permalink
Add Propose new listing button on empty search screen (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
DinerIsmail authored Sep 30, 2024
1 parent b87dd67 commit ebb02a6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions components/main-list/MainList.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { memo, useCallback, useEffect, useState, useMemo } from 'react'
import NextLink from 'next/link'
import { AnimatePresence } from 'framer-motion'
import {
chakra,
Flex,
Grid,
Center,
Button,
Text,
useDisclosure,
} from '@chakra-ui/react'
Expand Down Expand Up @@ -92,11 +94,14 @@ const MainList = ({ filteredItems, isMobile }) => {
</AnimatePresence>
</Grid>
) : (
<Center mt="2rem">
<Center mt="2rem" flexDirection="column" gap="1rem">
<Text maxW="400px" textAlign="center" color="gray.600">
No groups matched your search criteria 🤔 Maybe propose the
listing to the maintainers via the Propose new listing button?
No listings were found that match your search 🤔 Maybe propose
the listing to the maintainers?
</Text>
<Button as={NextLink} href="/new-listing" variant="rw">
Propose new listing
</Button>
</Center>
)}
</chakra.div>
Expand Down

0 comments on commit ebb02a6

Please sign in to comment.