forked from b00tc4mp/isdi-bootcamp-202405
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create footer and implement bottom butoms b00tc4mp#99
- Loading branch information
Showing
9 changed files
with
83 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"hash": "08fb5e56", | ||
"configHash": "99c78be0", | ||
"lockfileHash": "e3b0c442", | ||
"browserHash": "062eacc2", | ||
"optimized": {}, | ||
"chunks": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "module" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
body { | ||
|
||
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { useState } from 'react' | ||
import { FaUser } from 'react-icons/fa' | ||
import { RiHomeHeartFill } from 'react-icons/ri' | ||
import { GiPawHeart } from 'react-icons/gi' | ||
import { MdOutlineMail } from "react-icons/md" | ||
|
||
import Button from '../library/Button' | ||
import Container from '../library/Container' | ||
|
||
export default function Footer({ onHomeClick, onPetsittersClick, onContactClick, onLoginClick }) { | ||
const [activeTab, setActiveTab] = useState('home') | ||
|
||
const handleTabClick = (tabName, clickHandler) => { | ||
setActiveTab(tabName) | ||
clickHandler() | ||
} | ||
|
||
return <footer className="fixed items-center bottom-0 left-0 w-full flex justify-evenly shadow-[0_-1px_1px] bg-white"> | ||
<Container> | ||
<Button onClick={() => handleTabClick('home', onHomeClick)} className={`bg-transparent border-transparent rounded-lg border border-solid p-1 ${activeTab === 'home' ? 'text-purple-500' : 'text-dimgray'}`}> | ||
<RiHomeHeartFill size={24} /> | ||
</Button> | ||
|
||
<Button onClick={() => handleTabClick('petsitters', onPetsittersClick)} className={`bg-transparent border-transparent rounded-lg border border-solid p-1 ${activeTab === 'petsitters' ? 'text-purple-500' : 'text-dimgray'}`}> | ||
<GiPawHeart size={24} /> | ||
</Button> | ||
|
||
<Button onClick={() => handleTabClick('contact', onContactClick)} className={`bg-transparent border-transparent rounded-lg border border-solid p-1 ${activeTab === 'contact' ? 'text-purple-500' : 'text-dimgray'}`}> | ||
<MdOutlineMail size={24} /> | ||
</Button> | ||
|
||
<Button onClick={() => handleTabClick('login', onLoginClick)} className={`bg-transparent border-transparent rounded-lg border border-solid p-1 ${activeTab === 'login' ? 'text-purple-500' : 'text-dimgray'}`}> | ||
<FaUser size={24} /> | ||
</Button> | ||
</Container> | ||
</footer> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
import { Routes, Route, useNavigate } from 'react-router-dom' | ||
|
||
import Header from './Header' | ||
import Heading from '../library/Heading' | ||
import Footer from './Footer' | ||
|
||
export default function Home({ onLogout }) { | ||
const navigate = useNavigate() | ||
|
||
const handleHome = () => navigate('/') | ||
|
||
const handlePetsitters = () => navigate('/petsitters') | ||
|
||
const handleContact = () => navigate('/contact') | ||
|
||
const hadleLogin = () => navigate('/login') | ||
|
||
return <> | ||
<Header onLogout={onLogout}></Header> | ||
|
||
<main> | ||
<main className='bg-teal-100 h-screen'> | ||
<Heading>Exoticus</Heading> | ||
</main> | ||
|
||
<Footer onHomeClick={handleHome} onPetsittersClick={handlePetsitters} onContactClick={handleContact} onLoginClick={hadleLogin} /> | ||
</> | ||
} |