Skip to content

Commit

Permalink
Enhance Navbar with sticky positioning and adjust logo height; replac…
Browse files Browse the repository at this point in the history
…e CarouselComponent with lazy-loaded image in Home page for improved performance
  • Loading branch information
S-e-b-a-s committed Dec 11, 2024
1 parent 2f410fe commit 50f323e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
5 changes: 4 additions & 1 deletion frontend/src/components/common/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@ const Navbar = () => {
className="navbar"
sx={{
backdropFilter: 'blur(10px)',
position: 'sticky',
top: 0,
zIndex: 1001,
}}
>
<Box
Expand All @@ -282,7 +285,7 @@ const Navbar = () => {
alt="logo-cyc-navbar"
style={{ cursor: 'pointer' }}
width={110}
height={55}
height={56}
src={companyLogo}
onClick={() => navigate('/logged/home')}
/>
Expand Down
13 changes: 7 additions & 6 deletions frontend/src/components/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ const pointsVideo = `${getApiUrl().apiUrl}static/videos/points.mp4`;
// Libraries
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

const benefits = [{ image: benefit, title: 'befenit' }];

const Home = () => {
const [todayBirthdays, setTodayBirthdays] = useState([]);
const [yesterdayBirthdays, setYesterdayBirthdays] = useState([]);
Expand Down Expand Up @@ -450,10 +448,13 @@ const Home = () => {
>
Beneficios
</Typography>
<CarouselComponent
items={benefits}
height={'960px'}
width={'540px'}
<img
loading="lazy"
style={{ borderRadius: '1rem' }}
width={540}
height={960}
src={benefit}
alt="beneficio"
/>
</Box>
</Box>
Expand Down

0 comments on commit 50f323e

Please sign in to comment.