Skip to content

Commit

Permalink
Merge pull request #64 from IvanAmoros/uxui-improves
Browse files Browse the repository at this point in the history
title wo transition
  • Loading branch information
IvanAmoros authored Oct 7, 2024
2 parents f3238b3 + 1a75862 commit 39a1117
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions src/components/FilmFestival.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import LoginModal from './LoginModal';
const FilmFestival = () => {
const { isLoggedIn, logout } = useAuth();
const [loginModalOpen, setLoginModalOpen] = useState(false);
const [shrinkHeader, setShrinkHeader] = useState(false);

const handleOpenLoginModal = () => {
setLoginModalOpen(true);
Expand All @@ -25,21 +24,9 @@ const FilmFestival = () => {
};

useEffect(() => {
const handleScroll = () => {
if (window.scrollY > 10) {
setShrinkHeader(true);
} else {
setShrinkHeader(false);
}
};

window.addEventListener('scroll', handleScroll);

window.scrollTo(0, 0);

return () => {
window.removeEventListener('scroll', handleScroll);
};
}, []);

const handleRefresh = () => {
Expand All @@ -55,19 +42,17 @@ const FilmFestival = () => {
zIndex: 1000,
backgroundColor: '#282c34',
transition: 'all 0.5s ease',
padding: shrinkHeader ? '8px 0' : '16px 0',
//boxShadow: shrinkHeader ? '0 2px 8px rgba(0, 0, 0, 0.1)' : 'none',
p: 1
}}
>
<Typography
variant="h1"
component="h1"
sx={{
fontFamily: 'Lobster, cursive',
fontSize: shrinkHeader ? '24px' : '45px',
fontSize: '45px',
textAlign: 'center',
color: 'white',
transition: 'font-size 0.5s ease',
cursor: 'pointer',
}}
onClick={handleRefresh}
Expand Down

0 comments on commit 39a1117

Please sign in to comment.