Skip to content

Commit

Permalink
Merge pull request #34 from HackDavis/fix/devops
Browse files Browse the repository at this point in the history
fixed linting
  • Loading branch information
Austin2Shih authored Mar 11, 2024
2 parents 77f533b + 71a447e commit dd98b77
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 10 deletions.
8 changes: 6 additions & 2 deletions app/(pages)/(index-page)/_components/Everyone/Everyone.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import styles from './Everyone.module.scss';
import React from 'react';
import AutoImage from '@components/AutoImage/AutoImage';

const Everyone = () => {
return (
Expand All @@ -14,10 +15,13 @@ const Everyone = () => {
previous experience required.
</p>
<div className={styles['cowsit']}>
<img src="/index/Everyone/cowsit.png" alt="cowsit" />
<AutoImage src="/index/Everyone/cowsit.png" alt="cowsit" />
</div>
<div className={styles['top-leaf']}>
<img src="/index/Everyone/river_rightside-combined.png" alt="topleaf" />
<AutoImage
src="/index/Everyone/river_rightside-combined.png"
alt="topleaf"
/>
</div>
<div className={styles['bottom-leaf']}></div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styles from './Form.module.scss';
import { CiCalendar } from 'react-icons/ci';
import WordCycle from './_components/WordCycle';
import Link from 'next/link';
// import Link from 'next/link';

export default function Form() {
return (
Expand Down
27 changes: 27 additions & 0 deletions app/(pages)/_components/AutoImage/AutoImage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import Image from 'next/image';

export default function AutoImage({
height: _,
width: __,
src,
alt,
style,
...rest
}: {
height?: number;
width?: number;
src: string;
alt: string;
style?: object;
}) {
return (
<Image
src={src}
height={4000}
width={4000}
alt={alt}
{...rest}
style={style ?? { width: '100%', height: 'auto' }}
/>
);
}
7 changes: 4 additions & 3 deletions app/(pages)/about-us/_components/About/About.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import styles from './About.module.scss'; // The name of your CSS module file
import AutoImage from '@components/AutoImage/AutoImage';

const About = () => {
return (
Expand All @@ -13,7 +14,7 @@ const About = () => {
grow in an inclusive environment.
</div>
<div className={styles.inclusivity_cow}>
<img
<AutoImage
src="/about-us-icon/cow.svg"
alt="Cow"
style={{
Expand All @@ -35,7 +36,7 @@ const About = () => {
experience and an opportunity to explore a new discipline.
</div>
<div className={styles.Handson_froggy}>
<img src="/about-us-icon/froggy.svg" alt="Froggy" />
<AutoImage src="/about-us-icon/froggy.svg" alt="Froggy" />
</div>
</div>
<div className={styles.Impactful}>
Expand All @@ -45,7 +46,7 @@ const About = () => {
local and global communities.
</div>
<div className={styles.Impactful_bunny}>
<img src="/about-us-icon/bunny.svg" alt="Bunny" />
<AutoImage src="/about-us-icon/bunny.svg" alt="Bunny" />
</div>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion app/(pages)/about-us/_components/Hello/Hello.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import styles from './Hello.module.scss';
import React from 'react';
import AutoImage from '@components/AutoImage/AutoImage';

const Hello = () => {
return (
Expand All @@ -12,7 +13,7 @@ const Hello = () => {
</p>
</header>
<div className={styles['banner-image']}>
<img src="/about-us-icon/Banner image.svg" alt="Banner image" />
<AutoImage src="/about-us-icon/Banner image.svg" alt="Banner image" />
</div>
</div>
);
Expand Down
5 changes: 3 additions & 2 deletions app/(pages)/about-us/_components/Sponsor/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import styles from './Sponsor.module.scss';
import AutoImage from '@/app/(pages)/_components/AutoImage/AutoImage';

type CardProps = {
imageUrl: string;
Expand All @@ -17,12 +18,12 @@ const Card: React.FC<CardProps> = ({
return (
<div className={styles.card}>
<div className={styles.frame}>
<img
<AutoImage
src={frameImageUrl}
alt="Polaroid frame"
style={{ position: 'absolute', width: '100%', height: '100%' }}
/>
<img
<AutoImage
src={imageUrl}
alt={title}
style={{ width: '100%', height: 'auto', position: 'relative' }}
Expand Down
3 changes: 2 additions & 1 deletion app/(pages)/about-us/_components/Sponsor/Sponsor.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import styles from './Sponsor.module.scss';
import Card from './Card';
import AutoImage from '@components/AutoImage/AutoImage';

const Sponsor = () => {
const cards = [
Expand Down Expand Up @@ -70,7 +71,7 @@ const Sponsor = () => {
<span className={styles['button-words']}>Sponsor 2024</span>
</button>
<div className={styles.cow_duck}>
<img
<AutoImage
src="/about-us-icon/cow and duck.svg"
alt="Cow and duck"
style={{
Expand Down

0 comments on commit dd98b77

Please sign in to comment.