Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update next 14 #688

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [20.x]

env:
EVENTS_SPREADSHEET_ID: ${{ secrets.EVENTS_SPREADSHEET_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [20.x]

env:
EVENTS_SPREADSHEET_ID: ${{ secrets.EVENTS_SPREADSHEET_ID }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/node_modules
/.pnp
.pnp.js
yarn.lock

# testing
/coverage
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/gallium
lts/iron
2 changes: 0 additions & 2 deletions _redirects

This file was deleted.

6 changes: 3 additions & 3 deletions components/ActiveLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ const ActiveLink = ({ children, activeClassName, ...props }) => {
: childClassName;

return (
//clones child with className if className exists
<Link {...props}>
//clones child with className if className exists
(<Link {...props} legacyBehavior>
{React.cloneElement(child, {
className: className || null,
})}
</Link>
</Link>)
);
};

Expand Down
2 changes: 1 addition & 1 deletion components/Carousel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Image from 'next/image';
import Image from 'next/legacy/image';
import React from 'react';

// width of each img in px
Expand Down
2 changes: 1 addition & 1 deletion components/Committees/CommitteeEventCard.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Image from 'next/image';
import Image from 'next/legacy/image';
import React from 'react';

function CommitteeEventCard(props) {
Expand Down
2 changes: 1 addition & 1 deletion components/Committees/CommitteeSectionIntro.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@fortawesome/free-brands-svg-icons';
import { faLink } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import Image from 'next/image';
import Image from 'next/legacy/image';
import React from 'react';

function CommitteeIconLink({ committee, link }) {
Expand Down
4 changes: 2 additions & 2 deletions components/DevProjectCards.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function Project({
function projects(props) {
return (
// TODO: more flexible mobile views
<>
(<>
{props.projects.map((project) => (
<Project
{...project}
Expand All @@ -121,7 +121,7 @@ function projects(props) {
key={project.name}
/>
))}
</>
</>)
);
}

Expand Down
20 changes: 10 additions & 10 deletions components/Events/SelectedEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function SelectedEvent({ event }) {
}, [event]);

return (
<div className={styles['card-container']}>
(<div className={styles['card-container']}>
<h2 className={styles['card-header']}>event information</h2>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
Expand All @@ -42,21 +42,21 @@ function SelectedEvent({ event }) {
<ul className="list-unstyled">
{links.map(({ text, href, ext }) => (
<li key={href}>
<Link href={href}>
<a
className={styles['event-link']}
target={ext ? '_blank' : ''}
rel={ext ? 'noopener noreferrer' : ''}
>
{text}
</a>
<Link
href={href}
className={styles['event-link']}
target={ext ? '_blank' : ''}
rel={ext ? 'noopener noreferrer' : ''}>

{text}

</Link>
</li>
))}
</ul>
)}
</div>
</div>
</div>)
);
}

Expand Down
52 changes: 26 additions & 26 deletions components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Link from 'next/link';
import React from 'react';
import SocialMedia from './SocialMedia';
import committees from '../data/committees';
import styles from '../styles/components/Footer.module.scss';
import SocialMedia from './SocialMedia';

const footerACMLinks = [
{ title: 'About', path: '/about' },
Expand All @@ -27,21 +27,21 @@

function FooterLinkElement({ title, path, ext }) {
return (
<Link href={path}>
<a
className={styles['link-footer']}
target={ext ? '_blank' : ''}
rel={ext ? 'noopener noreferrer' : ''}
>
{title}
</a>
</Link>
(<Link
href={path}
className={styles['link-footer']}
target={ext ? '_blank' : ''}
rel={ext ? 'noopener noreferrer' : ''}>

{title}

</Link>)
);
}

function Footer() {
return (
<footer className={styles.footer}>
(<footer className={styles.footer}>
<nav
className={styles['footer-inner']}
aria-labelledby="footer-navigation"
Expand All @@ -54,25 +54,25 @@
<h3 className={styles['footer-header']}>Find us on social media</h3>
<SocialMedia type="light" />
<div className="mt-1">
<Link href="http://eepurl.com/hdEvNP">
<a
className="button tight"
target="_blank"
rel="noreferrer noopener"
>
<Link
href="http://eepurl.com/hdEvNP"
className="button tight"
target="_blank"
rel="noreferrer noopener">

Join our Mailing List
</a>

</Link>
</div>
<div className="mt-1">
<Link href="https://linktr.ee/acmucla">
<a
className="button tight"
target="_blank"
rel="noreferrer noopener"
>
<Link
href="https://linktr.ee/acmucla"
className="button tight"
target="_blank"
rel="noreferrer noopener">

Linktree
</a>

</Link>
</div>
<p className={styles['footer-header']}>Reach us at</p>
Expand Down Expand Up @@ -116,7 +116,7 @@
/* TODO: resolve 404 with <Image /> component */
/* eslint-disable-next-line @next/next/no-img-element */
title={
<img

Check warning on line 119 in components/Footer.js

View workflow job for this annotation

GitHub Actions / lint (20.x)

Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element

Check warning on line 119 in components/Footer.js

View workflow job for this annotation

GitHub Actions / lint (20.x)

Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element
className="committee-sidebar-image"
src={wordmark_dark}
alt={`ACM ${name}`}
Expand Down Expand Up @@ -151,7 +151,7 @@
</span>
</div>
</nav>
</footer>
</footer>)
);
}

Expand Down
50 changes: 25 additions & 25 deletions components/Impact/BlogCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,30 @@ export default function BlogCard({
// TODO: not sure how, but we need to semantically
// insert a description of the image for screenreaders;
// not natively supported by background-image
<Link href={href}>
<a
target="_blank"
className={styles['blog-card']}
style={backgroundStyle}
>
<div className={styles['blog-card-content']}>
<h4 className={styles['blog-title']}>{title}</h4>
<p className={styles['blog-info']}>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
className={styles['blog-author-img']}
src={authorImg}
alt={authorAlt}
/>
<div>
{author}
<br />
{/* TODO: moment for date? */}
{date} • {length}
</div>
</p>
</div>
</a>
</Link>
(<Link
href={href}
target="_blank"
className={styles['blog-card']}
style={backgroundStyle}>

<div className={styles['blog-card-content']}>
<h4 className={styles['blog-title']}>{title}</h4>
<p className={styles['blog-info']}>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
className={styles['blog-author-img']}
src={authorImg}
alt={authorAlt}
/>
<div>
{author}
<br />
{/* TODO: moment for date? */}
{date} • {length}
</div>
</p>
</div>

</Link>)
);
}
2 changes: 1 addition & 1 deletion components/Impact/Carousel.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useState, useEffect } from 'react';

import BlogCard from './BlogCard';
import { blogs } from '../../data/impact';
import styles from '../../styles/pages/impact.module.scss';

import BlogCard from './BlogCard';

function Carousel() {
const [activeItem, changeActiveItem] = useState(0); // keeps track of blog index (0, 1, or 2) that is currently active
Expand Down
2 changes: 1 addition & 1 deletion components/Impact/WorkshopCard.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Image from 'next/image';
import Image from 'next/legacy/image';
import React from 'react';

import styles from '../../styles/pages/impact.module.scss';
Expand Down
2 changes: 1 addition & 1 deletion components/Internship/CommitteeInternshipInfo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Image from 'next/image';
import Image from 'next/legacy/image';
import React, { useState } from 'react';

import styles from '../../styles/components/Internship/CommitteeInternshipInfo.module.scss';
Expand Down
28 changes: 14 additions & 14 deletions components/Internship/NextSteps.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@ import React from 'react';
function NextSteps(props) {
const { image, name, info } = props;
return (
<>
<div
style={{
border: '1px solid grey',
margin: '5px',
borderRadius: '5px',
padding: '15px',
}}
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={image} alt={name} height="30px" />
<p>{info}</p>
</div>
</>
// <button className={styles['committee-card']} onClick={() => setFlipped(!isFlipped)} role='tab'>
// <div className={`${styles['next-steps-card-inner']} ${styles[isFlipped ? null : 'is-flipped']}`}>
// <div className={styles['next-steps-card-face']}>
Expand All @@ -32,6 +18,20 @@ function NextSteps(props) {
// </div>
// </div>
// </button>
(<>
<div
style={{
border: '1px solid grey',
margin: '5px',
borderRadius: '5px',
padding: '15px',
}}
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={image} alt={name} height="30px" />
<p>{info}</p>
</div>
</>)
);
}

Expand Down
14 changes: 7 additions & 7 deletions components/JEDI/AllyshipSpaceCard.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Image from 'next/image';
import Image from 'next/legacy/image';
import Link from 'next/link';
import React from 'react';

Expand All @@ -22,7 +22,7 @@ function AllyshipSpaceCard({
priority,
}) {
return (
<div className={`${styles['allyship-row']} ${styles['mb-2']}`}>
(<div className={`${styles['allyship-row']} ${styles['mb-2']}`}>
<div className={styles['allyship-image']}>
<Image src={img} alt={alt} priority={priority} />
</div>
Expand All @@ -31,15 +31,15 @@ function AllyshipSpaceCard({
{/* wrapped in a fragment to allow for spacing */}
{rsvp && (
<>
<Link href={rsvp}>
<a className={styles['jedi-link']}>RSVP</a>
<Link href={rsvp} className={styles['jedi-link']}>
RSVP
</Link>{' '}
</>
)}
{slides && (
<>
<Link href={slides}>
<a className={styles['jedi-link']}>Slides</a>
<Link href={slides} className={styles['jedi-link']}>
Slides
</Link>{' '}
</>
)}
Expand All @@ -53,7 +53,7 @@ function AllyshipSpaceCard({
</p>
<p className={styles['my-tight']}>{description}</p>
</div>
</div>
</div>)
);
}

Expand Down
Loading
Loading