/* eslint-disable tailwindcss/no-custom-classname */ // import { StyledButton } from '@/components/styled-button' import { Button } from '@mui/joy' import Typography from '@mui/joy/Typography' import Box from '@mui/material/Box' import Grid from '@mui/material/Grid' import React, { useEffect } from 'react' import { useNavigate } from 'react-router-dom' import Logo from '@/assets/logo.svg' import screenShotMyChore from '@/assets/screenshot-my-chore.png' import { GitHub } from '@mui/icons-material' import useWindowWidth from '../../hooks/useWindowWidth' const HomeHero = () => { const navigate = useNavigate() const windowWidth = useWindowWidth() const windowThreshold = 600 const HERO_TEXT_THAT = [ // 'Donetick simplifies the entire process, from scheduling and reminders to automatic task assignment and progress tracking.', // 'Donetick is the intuitive task and chore management app designed for groups. Take charge of shared responsibilities, automate your workflow, and achieve more together.', 'An open-source, user-friendly app for managing tasks and chores, featuring customizable options to help you and others stay organized', ] const [heroTextIndex, setHeroTextIndex] = React.useState(0) useEffect(() => { // const intervalId = setInterval( // () => setHeroTextIndex(index => index + 1), // 4000, // every 4 seconds // ) // return () => clearTimeout(intervalId) }, []) const Title = () => ( Done tick ) const Subtitle = () => ( Simplify Tasks & Chores, Together. ) const CTAButton = () => ( { // if the url is donetick.com then navigate to app.donetick.com/my/chores // else navigate to /my/chores if (window.location.hostname === 'donetick.com') { window.location.href = 'https://app.donetick.com/my/chores' } else { navigate('/my/chores') } }} > Get started ) return ( // {`"${HERO_TEXT_THAT[heroTextIndex % HERO_TEXT_THAT.length]}"`} { // new window open to https://github.com/Donetick: window.open('https://github.com/donetick/donetick', '_blank') }} startDecorator={} > Github {windowWidth > windowThreshold && ( )} ) } export default HomeHero