import React from 'react'; import { Box, Heading, HStack, Text, useColorModeValue, VStack, } from '@chakra-ui/react'; import { PrimaryBtn, SecondaryBtn } from '../utils/Buttons'; import { useNavigate } from 'react-router-dom'; const Hero = ({ display, btnWidth, p, m, onClose }) => { const navigate = useNavigate(); const changeRoute = (type) => { if (type === 'create') { navigate('/create-account'); } else { navigate('/login'); } onClose(); }; return ( DEV Community 👩‍💻👨‍💻 {' '} is a community of 878,258 amazing developers We're a place where coders share, stay up-to-date and grow their careers. changeRoute('create')} > Create Account Log in ); }; export default Hero;