ok, so this website should be a modern private real estate, its a website where we will add high end properties, invitation only, so you need to create all the structure, backend as well so we can add and edit properties, create accounts
61cba86 verified Download src/components/PropertyCard.jsx from matheusbezerra1/react-chakra-ui-magic-wand: direct link, hf CLI and curl.
- Browser
- Download file 1.38 kB
-
https://huggingface.co/spaces/matheusbezerra1/react-chakra-ui-magic-wand/resolve/main/src/components/PropertyCard.jsx
- Command line
-
hf download hf://spaces/matheusbezerra1/react-chakra-ui-magic-wand/src/components/PropertyCard.jsx
-
curl -L -o PropertyCard.jsx https://huggingface.co/spaces/matheusbezerra1/react-chakra-ui-magic-wand/resolve/main/src/components/PropertyCard.jsx
1.38 kB
| import { Box, Image, Heading, Text, Flex, Button } from '@chakra-ui/react' | |
| import { Link } from 'react-router-dom' | |
| export default function PropertyCard({ property, showActions = false }) { | |
| return ( | |
| <Box | |
| borderWidth="1px" | |
| borderRadius="lg" | |
| overflow="hidden" | |
| boxShadow="md" | |
| _hover={{ boxShadow: 'xl' }} | |
| transition="all 0.2s" | |
| > | |
| <Image src={property.mainImage} alt={property.title} h="200px" w="full" objectFit="cover" /> | |
| <Box p={6}> | |
| <Heading as="h3" size="md" mb={2}> | |
| {property.title} | |
| </Heading> | |
| <Text color="gray.600" mb={2}> | |
| {property.location} | |
| </Text> | |
| <Text fontWeight="bold" mb={4}> | |
| ${property.price.toLocaleString()} | |
| </Text> | |
| <Flex justify="space-between" align="center"> | |
| <Link to={`/properties/${property.id}`}> | |
| <Button colorScheme="blue" size="sm"> | |
| View Details | |
| </Button> | |
| </Link> | |
| {showActions && ( | |
| <Flex> | |
| <Link to={`/properties/${property.id}/edit`}> | |
| <Button size="sm" mr={2}> | |
| Edit | |
| </Button> | |
| </Link> | |
| <Button size="sm" colorScheme="red"> | |
| Delete | |
| </Button> | |
| </Flex> | |
| )} | |
| </Flex> | |
| </Box> | |
| </Box> | |
| ) | |
| } |