diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx index e0d1175..f5b07c8 100644 --- a/src/app/about/page.tsx +++ b/src/app/about/page.tsx @@ -11,10 +11,15 @@ const About = () => { const [isScrolled, setIsScrolled] = useState(false); const [scrollAllowed, setScrollAllowed] = useState(true); const contentCard = useRef(null); + const navBarRef = useRef(null); const contentCardDesktop = useRef(null); const router = useRouter(); const simulateScroll = (event: WheelEvent) => { - if (!isScrolled && !contentCardDesktop.current?.contains(event.target as Node)) { + if ( + !isScrolled && + !contentCardDesktop.current?.contains(event.target as Node) && + !navBarRef.current?.contains(event.target as Node) + ) { event.stopPropagation(); if (event.deltaY > 0) { setTimeout(() => { @@ -45,7 +50,8 @@ const About = () => { if ( touchStart === null || touchEnd === null || - contentCard.current?.contains(event.target as Node) + contentCard.current?.contains(event.target as Node) || + navBarRef.current?.contains(event.target as Node) ) { return; } @@ -82,7 +88,7 @@ const About = () => { onTouchEnd={scrollAllowed ? handleTouchEnd : undefined} > {/*
*/} - + {/*
*/} {

- {params.name.replace('%20', ' ')} + {params.name.replaceAll('%20', ' ')}

diff --git a/src/app/events/[clusterId]/[name]/[eventId]/page.tsx b/src/app/events/[clusterId]/[name]/[eventId]/page.tsx index 279b95f..7cf7791 100644 --- a/src/app/events/[clusterId]/[name]/[eventId]/page.tsx +++ b/src/app/events/[clusterId]/[name]/[eventId]/page.tsx @@ -14,7 +14,7 @@ const events = ({ params }: { params: { clusterId: number; name: string; eventId

- {params.name.replace('%20', ' ')} + {params.name.replaceAll('%20', ' ')}

diff --git a/src/app/gallery/page.tsx b/src/app/gallery/page.tsx index c313272..6ba7623 100644 --- a/src/app/gallery/page.tsx +++ b/src/app/gallery/page.tsx @@ -48,11 +48,12 @@ const History = () => { const [isScrolled, setIsScrolled] = useState(false); const [touchStart, setTouchStart] = useState(null); const [touchEnd, setTouchEnd] = useState(null); + const navBarRef = useRef(null); const shadowRef = useRef(null); const carouselRef = useRef(null); const router = useRouter(); const simulateScroll = (event: WheelEvent) => { - if (!isScrolled) { + if (!isScrolled && !navBarRef.current?.contains(event.target as Node)) { event.stopPropagation(); if (event.deltaY < 0) { setTimeout(() => { @@ -91,7 +92,8 @@ const History = () => { if ( touchStart === null || touchEnd === null || - carouselRef.current?.contains(event.target as Node) + carouselRef.current?.contains(event.target as Node) || + navBarRef.current?.contains(event.target as Node) ) { return; } @@ -121,7 +123,7 @@ const History = () => { >
- +
(false); const router = useRouter(); const simulateScroll = (event: WheelEvent) => { - if (!isScrolled) { + if (!isScrolled && !navBarRef.current?.contains(event.target as Node)) { event.stopPropagation(); if (event.deltaY > 0) { setTimeout(() => { @@ -25,6 +25,7 @@ export default function Home() { const [touchStart, setTouchStart] = useState(null); const [touchEnd, setTouchEnd] = useState(null); + const navBarRef = useRef(null); const handleTouchStart = (event: TouchEvent) => { setTouchEnd(null); @@ -35,8 +36,12 @@ export default function Home() { setTouchEnd(event.targetTouches[0].clientY); }; - const handleTouchEnd = () => { - if (touchStart === null || touchEnd === null) { + const handleTouchEnd = (event: TouchEvent) => { + if ( + touchStart === null || + touchEnd === null || + navBarRef.current?.contains(event.target as Node) + ) { return; } const distance = touchStart - touchEnd; @@ -63,7 +68,7 @@ export default function Home() { onTouchMove={handleTouchMove} onTouchEnd={handleTouchEnd} > - +
= ({ setForm }) => { // }; const handleFormSubmit = () => { - console.log(loginForm.userPassword); if (!loginForm.userPassword) console.log('Please enter your password'); else { handleLogin(); diff --git a/src/components/AuthLayout/signup.tsx b/src/components/AuthLayout/signup.tsx index 572d8e3..998de58 100644 --- a/src/components/AuthLayout/signup.tsx +++ b/src/components/AuthLayout/signup.tsx @@ -71,7 +71,6 @@ export const SignUp: React.FC = ({ setForm }) => { // // customErrorToast("Please verify that you are not a robot"); // return; // } - console.log('submitting'); userApi .authUserRegister({ // @ts-ignore-next-line diff --git a/src/components/Carousel/slideData.tsx b/src/components/Carousel/slideData.tsx index 71206cd..bea4afd 100644 --- a/src/components/Carousel/slideData.tsx +++ b/src/components/Carousel/slideData.tsx @@ -93,7 +93,7 @@ const SlideData: React.FC = ({ details }) => {
{details.name} @@ -103,7 +103,7 @@ const SlideData: React.FC = ({ details }) => { width={details.image?.width} height={details.image?.height} alt="image about event" - className="h-5/6 w-full rounded-xl" + className="h-[75%] w-full rounded-xl" />
{ height={Math.min(data.image?.height, 100)} objectPosition="center" objectFit="contain" - style={{ - height: Math.min(data.image?.height, 400).toString() + 'px', - }} - className={'rounded-lg'} + className={`rounded-lg lg:max-h[20vh] lg:max-w-[20vw]`} alt="cluster" onClick={() => { router.push(`/events/${id}/${name}/${data.id}`); diff --git a/src/components/Footer/Social.tsx b/src/components/Footer/Social.tsx index 0010e17..5e9060d 100644 --- a/src/components/Footer/Social.tsx +++ b/src/components/Footer/Social.tsx @@ -3,33 +3,50 @@ import facebook from '../../assets/images/facebook.svg'; import instagram from '../../assets/images/instagram.svg'; import youtube from '../../assets/images/youtube.svg'; import medium from '../../assets/images/medium.svg'; - +import Link from 'next/link'; import Image from 'next/image'; -const Social = () => { +const FooterItem = ({ link, imageSrc }: { link: string; imageSrc: string }) => { return ( -
+ Twitter - Medium - Instagram - YouTube - Facebook + + ); +}; + +const socialLinks = [ + { + src: twitter, + link: 'https://twitter.com/nitt_pragyan', + }, + { + src: medium, + link: 'https://medium.com/pragyan-blog', + }, + { + src: instagram, + link: 'https://www.instagram.com/pragyan_nitt/', + }, + { + src: youtube, + link: 'https://youtube.com/@PragyanNITTrichy', + }, + { + src: facebook, + link: 'https://m.facebook.com/pragyan.nitt', + }, +]; + +const Social = () => { + return ( +
+ {socialLinks.map((image, index) => ( + + ))}
); }; diff --git a/src/components/Landing/LoadingMobileView.tsx b/src/components/Landing/LoadingMobileView.tsx index 37cf0d9..708b7ea 100644 --- a/src/components/Landing/LoadingMobileView.tsx +++ b/src/components/Landing/LoadingMobileView.tsx @@ -1,7 +1,7 @@ import Image from 'next/image'; import offLight from '@/assets/images/OffLight.svg'; import onlight from '@/assets/images/OnLight.svg'; -import greenbutton from '@/assets/images/PressButton.svg'; +import greenbutton from '@/assets/images/PressButton.png'; const LoadingMobileView = ({ month, diff --git a/src/components/Landing/LoadingWebView.tsx b/src/components/Landing/LoadingWebView.tsx index 16f840e..85b2e68 100644 --- a/src/components/Landing/LoadingWebView.tsx +++ b/src/components/Landing/LoadingWebView.tsx @@ -1,7 +1,7 @@ import Image from 'next/image'; import offLight from '@/assets/images/OffLight.svg'; import onlight from '@/assets/images/OnLight.svg'; -import greenbutton from '@/assets/images/PressButton.svg'; +import greenbutton from '@/assets/images/PressButton.png'; const LoadingWebView = ({ month, @@ -46,7 +46,7 @@ const LoadingWebView = ({ {isButtonClicked ? `????????????` : 'READY TO TRAVEL?'}
-
+
{ @@ -56,7 +56,7 @@ const LoadingWebView = ({ }} alt="button" className={ - ' h-[30%] xl:h-[50%] w-[20%] hover:cursor-pointer ' + + ' h-[35%] xl:h-[40%] w-[12%] hover:cursor-pointer ' + (isButtonClicked ? ' ' : 'greenbutton') } /> diff --git a/src/components/NavBar/NavBar.tsx b/src/components/NavBar/NavBar.tsx index 39a4627..799b436 100644 --- a/src/components/NavBar/NavBar.tsx +++ b/src/components/NavBar/NavBar.tsx @@ -9,7 +9,11 @@ import Link from 'next/link'; import Menu from '@/components/Menu/Menu'; import styles from './navbar.module.css'; -const NavBar = () => { +interface NavBarProps { + NavRef?: React.RefObject; +} + +const NavBar = ({ NavRef }: NavBarProps) => { const LoginButton = () => { return ( @@ -66,7 +70,7 @@ const NavBar = () => { }, []); return ( -
+