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

Feat/organizer carousel #535

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Feat/organizer carousel #535

wants to merge 5 commits into from

Conversation

pandyrew
Copy link
Contributor

@pandyrew pandyrew commented Jan 1, 2025

Fun Organizer Carousel!

I put all the images and names and departments into sanity so I hope it works. I added localhost:3000 to the CORS origins in the sanity dashboard because i was running into CORS issues. LMK if there are better solutions.

Also I added Images to be optimized by next in the next.config. Only from Sanity.

Pictures that aren't added (as in if they weren't in the Zothacks headshots) are replaced with a placeholder: volunteer_sprite.png. Maybe we can pick a different one.

Screenshot 2024-12-31 at 5 18 30 PM

@@ -1,4 +1,4 @@
import { Landing, ChooseCharacter, FAQ, Sponsors, Partners } from "./sections";
import { Landing, ChooseCharacter, FAQ, Sponsors, Partners, Organizers } from "./sections";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[prettier] reported by reviewdog 🐶

Suggested change
import { Landing, ChooseCharacter, FAQ, Sponsors, Partners, Organizers } from "./sections";
import {
Landing,
ChooseCharacter,
FAQ,
Sponsors,
Partners,
Organizers,
} from "./sections";

"use client";

import React, { useEffect, useState } from "react";
import Image from "next/image";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'Image' is defined but never used.


import React, { useEffect, useState } from "react";
import Image from "next/image";
import box from "@/assets/images/center_chat_box.svg";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'box' is defined but never used.

import React, { useEffect, useState } from "react";
import Image from "next/image";
import box from "@/assets/images/center_chat_box.svg";
import boxBG from "@/assets/images/center_chat_box_bg.svg";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'boxBG' is defined but never used.

import Image from "next/image";
import box from "@/assets/images/center_chat_box.svg";
import boxBG from "@/assets/images/center_chat_box_bg.svg";
import Link from "next/link";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'Link' is defined but never used.


export const InfiniteMovingCards = ({
items,
direction = "left",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'direction' is assigned a value but never used.

export const InfiniteMovingCards = ({
items,
direction = "left",
speed = "fast",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'speed' is assigned a value but never used.

items,
direction = "left",
speed = "fast",
pauseOnHover = true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'pauseOnHover' is assigned a value but never used.

}) => {
const containerRef = React.useRef<HTMLDivElement>(null);
const scrollerRef = React.useRef<HTMLUListElement>(null);
const [start, setStart] = useState(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'start' is assigned a value but never used.

Comment on lines +36 to +37
scrollerRef.current.lastChild &&
scrollerRef.current.removeChild(scrollerRef.current.lastChild);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <no-unused-expressions> reported by reviewdog 🐶
Expected an assignment or function call and instead saw an expression.

Copy link
Contributor

github-actions bot commented Jan 1, 2025

Deploy preview for irvinehacks-site-2025 ready!

Name IrvineHacks Site
Preview Visit Preview
Commit a0293cf

@waalbert
Copy link
Contributor

waalbert commented Jan 6, 2025

Regarding your comment about needing to add localhost:3000 to CORS, the reason you have to do that is because you're using next/image and added cdn.sanity.io to next.config.js to optimize the images. We didn't have to worry about CORS in the past because we have our Sanity dataset exposed to the public, so we're able to use Sanity Client along with regular <img> tags. Our Sanity Client is configured to use Sanity's API CDN, so using Next to optimize images might not be needed as I'm not sure if Next can provide meaningful performance improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants