Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions components/associations/Associations.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useRef } from 'react';
import Image from 'next/image';
// import Image from 'next/image';
import Styles from './association.module.css';
import BottomGlitter from '../StyledText/BottomGlitter';

Expand All @@ -14,32 +14,26 @@ function Associations() {
<div className={Styles.associationMenu}>
<div className={Styles.associationMenuItem}>
<a href="#gdsc">
<Image
<img
className={Styles.associationImage}
height="100%"
width="100%"
src="/sponsors/gdsc.png"
alt="Google Developers Student Clubs, BIT Sindri"
/>
</a>
</div>
<div className={Styles.associationMenuItem}>
<a href="#gfg">
<Image
<img
className={Styles.associationImage}
height="100%"
width="100%"
src="/sponsors/gfg.png"
alt="GeeksForGeeks Student Chapter, BIT Sindri"
/>
</a>
</div>
<div className={Styles.associationMenuItem}>
<a href="#codechef">
<Image
<img
className={Styles.associationImage}
height="100%"
width="100%"
src="/sponsors/codechef.jpg"
alt="Codechef Student Chapter, BIT Sindri"
/>
Expand Down
15 changes: 12 additions & 3 deletions components/navbar/Navbar.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/* eslint-disable no-alert */
import React, { useEffect, useState } from 'react';
import { HiMenuAlt4 } from 'react-icons/hi';
import Image from 'next/image';
import Link from 'next/link';
import styles from './Navbar.module.css';
import Logo from '../../assets/hncc-logo.png';
// ✅ Fixed: use logo directly with <img> instead of next/image for Netlify
import Button from '../button/Button';
import Sidebar from './Sidebar';

const Logo = '/hncc-logo.png';

const SpanStyle = {
zIndex: 1,
color: 'inherit',
Expand Down Expand Up @@ -61,7 +62,15 @@ function Navbar() {
<div>
<Link href="/">
<a className="flex items-center">
<Image src={Logo} alt="HnCC" height="60px" width="60px" />
{/* ✅ Fixed: using <img> ensures it loads correctly from public on Netlify */}
<img
src={Logo}
alt="HnCC"
height="60"
width="60"
className="mr-2"
style={{ objectFit: 'contain' }}
/>
<h2 id="hnccTitle" className={styles.navTitle}>
Hackathon and Coding Club
</h2>
Expand Down
15 changes: 12 additions & 3 deletions components/navbar/Sidebar.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React, { useEffect, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
import { CgClose } from 'react-icons/cg';
import Image from 'next/image';
import Link from 'next/link';
import styles from './Hamburger.module.css';
import Logo from '../../assets/hncc-logo.png';
// ✅ Fixed: use logo directly with <img> instead of next/image for Netlify
import Button from '../button/Button';

const Logo = '/hncc-logo.png';

const SpanStyle = {
zIndex: 1,
color: 'inherit',
Expand Down Expand Up @@ -65,7 +66,15 @@ function Sidebar({ isMounted, unmount }) {
<div>
<Link href="/">
<a className="flex items-center" onClick={unmount}>
<Image src={Logo} alt="HnCC" height="60px" width="60px" />
{/* ✅ Fixed: use <img> for Netlify compatibility */}
<img
src={Logo}
alt="HnCC"
height="60"
width="60"
className="mr-2"
style={{ objectFit: 'contain' }}
/>
</a>
</Link>
</div>
Expand Down
File renamed without changes