Skip to content

Commit 6523005

Browse files
Fixed the footer not at bottom
1 parent ea870dc commit 6523005

File tree

2 files changed

+22
-20
lines changed

2 files changed

+22
-20
lines changed

src/App.jsx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,27 @@ function App() {
2626
const { data, isLoading, error } = useRepoData();
2727

2828
if (isLoading)
29-
return <div className="d-flex justify-content-center align-items-center" style={{ height: '100vh' }}>
30-
<h1>Loading...</h1>
31-
</div>;
29+
return (
30+
<div className="d-flex justify-content-center align-items-center" style={{ height: '100vh' }}>
31+
<h1>Loading...</h1>
32+
</div>
33+
);
3234

3335
if (error)
34-
return <div className="d-flex justify-content-center align-items-center" style={{ height: '100vh' }}>
35-
<h1>Error: {error.message}</h1>
36-
</div>;
36+
return (
37+
<div className="d-flex justify-content-center align-items-center" style={{ height: '100vh' }}>
38+
<h1>Error: {error.message}</h1>
39+
</div>
40+
);
3741

3842
return (
39-
<div className='d-flex flex-column'>
43+
<div className="d-flex flex-column min-vh-100">
4044
<Router>
4145
<SideBar>
42-
43-
<LoadingBar height={3} color='#f11946' progress={progress} />
46+
<LoadingBar height={3} color="#f11946" progress={progress} />
4447
<CursorComponent />
4548

46-
<div className='flex-grow-1'>
49+
<div className="d-flex flex-column justify-content-between min-vh-100">
4750
<Routes>
4851
{data.map((obj) => (
4952
<React.Fragment key={obj.name}>
@@ -53,16 +56,15 @@ function App() {
5356
</React.Fragment>
5457
))}
5558
</Routes>
59+
<Footer />
5660
</div>
5761

58-
<Footer />
5962
<BackToTop />
6063

61-
<button className="btn border-0" onClick={() => setShowChatbot(!showChatbot)} style={{ zIndex: 1001, position: 'fixed', bottom: '10px', right: '3px' }} >
62-
<TbMessageChatbot className='text-light' style={{ fontSize: '3rem' }} />
64+
<button className="btn border-0" onClick={() => setShowChatbot(!showChatbot)} style={{ zIndex: 1001, position: 'fixed', bottom: '10px', right: '3px' }}>
65+
<TbMessageChatbot className="text-light" style={{ fontSize: '3rem' }} />
6366
</button>
6467
{showChatbot && <Chatbot />}
65-
6668
</SideBar>
6769
</Router>
6870
</div>

src/components/shared/Footer.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const Footer = () => {
66
const year = new Date().getFullYear();
77

88
return (
9-
<footer className='mt-2 py-4 border-top border-info border-2 d-flex flex-column flex-md-row align-items-center justify-content-md-evenly text-center text-md-start' style={{backgroundColor: '#12151e', position: 'sticky', bottom: 0, width: '100%', zIndex: 1000}}>
9+
<footer className="mt-2 py-4 border-top border-info border-2 d-flex flex-column flex-md-row align-items-center justify-content-md-evenly text-center text-md-start" style={{ backgroundColor: '#12151e', width: '100%', zIndex: 1000 }}>
1010
<div className="w-50 text-light mb-3 mb-md-0">
1111
<h5 className="h5 mb-3">WEB MASTER LOG 🚀</h5>
1212
<p className="small">
@@ -18,19 +18,19 @@ const Footer = () => {
1818
<h2 className="h5 mb-3">Connect with me</h2>
1919
<div className="d-flex justify-content-around mb-2">
2020
<motion.a whileHover={{ scale: 1.2 }} className="text-white me-2" href="https://discord.gg/tSqtvHUJzE">
21-
<FaDiscord style={{width: '25px', height: '25px'}} />
21+
<FaDiscord style={{ width: '25px', height: '25px' }} />
2222
</motion.a>
2323
<motion.a whileHover={{ scale: 1.2 }} className="text-white me-2" href="https://www.linkedin.com/in/avdhesh-varshney/">
24-
<FaLinkedin style={{width: '25px', height: '25px'}} />
24+
<FaLinkedin style={{ width: '25px', height: '25px' }} />
2525
</motion.a>
2626
<motion.a whileHover={{ scale: 1.2 }} className="text-white me-2" href="https://x.com/__Avdhesh__">
27-
<FaXTwitter style={{width: '25px', height: '25px'}} />
27+
<FaXTwitter style={{ width: '25px', height: '25px' }} />
2828
</motion.a>
2929
<motion.a whileHover={{ scale: 1.2 }} className="text-white me-2" href="https://www.youtube.com/@Code_A2Z">
30-
<FaYoutube style={{width: '25px', height: '25px'}} />
30+
<FaYoutube style={{ width: '25px', height: '25px' }} />
3131
</motion.a>
3232
<motion.a whileHover={{ scale: 1.2 }} className="text-white" href="https://github.com/Avdhesh-Varshney">
33-
<FaGithub style={{width: '25px', height: '25px'}} />
33+
<FaGithub style={{ width: '25px', height: '25px' }} />
3434
</motion.a>
3535
</div>
3636

0 commit comments

Comments
 (0)