Skip to content
Draft
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
6 changes: 4 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ import { Inter } from "next/font/google";

export const metadata: Metadata = {
title: "ICS Student Council",
description: "",
description:
"The ICS Student Council at UC Irvine supports students through events, projects, and community initiatives.",
openGraph: {
title: "ICS Student Council",
description: "",
description:
"The ICS Student Council at UC Irvine supports students through events, projects, and community initiatives.",
url: "https://www.icssc.club",
// images: [
// {
Expand Down
8 changes: 4 additions & 4 deletions src/app/terms-of-service/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -794,11 +794,11 @@ export default function Page() {
Policy:{" "}
<strong>
<a
href="https://studentcouncil.ics.uci.edu/privacy-policy"
href="https://www.icssc.club/privacy-policy"
target="_blank"
rel="noopener noreferrer"
>
https://studentcouncil.ics.uci.edu/privacy-policy
https://www.icssc.club/privacy-policy
</a>
</strong>
. By using the Services, you agree to be bound by our Privacy Policy,
Expand Down Expand Up @@ -1114,11 +1114,11 @@ export default function Page() {
us at <a href="mailto:icssc@uci.edu">icssc@uci.edu</a>. If you have any
questions regarding privacy, please read our Privacy Policy:{" "}
<a
href="https://studentcouncil.ics.uci.edu/privacy-policy"
href="https://www.icssc.club/privacy-policy"
target="_blank"
rel="noopener noreferrer"
>
https://studentcouncil.ics.uci.edu/privacy-policy
https://www.icssc.club/privacy-policy
</a>
.
</p>
Expand Down
4 changes: 2 additions & 2 deletions src/components/board/candidates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";
function StatementText({ text }: { text: string }) {
return (
<>
{text.split("\n\n").map((p) => (
<p key={p.slice(0, 40)}>{p}</p>
{text.split("\n\n").map((paragraph, index) => (
<p key={`${index}-${paragraph.slice(0, 40)}`}>{paragraph}</p>
))}
</>
);
Expand Down
10 changes: 5 additions & 5 deletions src/components/header/mobile-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export function MobileNav() {
const [expandedItems, setExpandedItems] = useState<string[]>([]);
const boardNotifyDismissed = useNavNotifyDismissed("/board");

const toggleMenu = () => {
setOpen((prev) => !prev);
const closeMenu = () => {
setOpen(false);
};

const toggleExpand = (name: string) => {
Expand All @@ -48,7 +48,7 @@ export function MobileNav() {
}, []);

return (
<Dialog open={open} onOpenChange={toggleMenu}>
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger className="flex md:hidden" asChild>
<Button
className="size-10 p-0 hover:bg-ic-muted/10"
Expand Down Expand Up @@ -105,7 +105,7 @@ export function MobileNav() {
"relative flex items-center space-x-2 text-neutral-400 no-underline transition-all hover:text-ic-pink",
pathname === child.link && "font-medium text-ic-pink",
)}
onClick={toggleMenu}
onClick={closeMenu}
>
<span className="text-center text-xl">
{child.name}
Expand All @@ -125,7 +125,7 @@ export function MobileNav() {
"relative flex flex-col items-center text-ic-white no-underline transition-all hover:text-ic-pink",
pathname === item.link && "font-medium text-ic-pink",
)}
onClick={toggleMenu}
onClick={closeMenu}
>
<span className="relative text-center text-2xl">
{item.name}
Expand Down
15 changes: 10 additions & 5 deletions src/components/header/use-nav-notify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ export function useNavNotifyDismissed(path: string) {

useEffect(() => {
const key = `${STORAGE_KEY}:${path}`;
if (pathname === path) {
localStorage.setItem(key, "1");
setDismissed(true);
} else {
setDismissed(localStorage.getItem(key) === "1");
try {
if (pathname === path) {
localStorage.setItem(key, "1");
setDismissed(true);
} else {
setDismissed(localStorage.getItem(key) === "1");
}
} catch {
// Fallback to showing notification when storage is unavailable.
setDismissed(pathname === path);
}
}, [pathname, path]);

Expand Down
1 change: 0 additions & 1 deletion src/components/projects/projects-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export const PROJECTS_DATA: Project[] = [
{
name: "ZotMeal",
githubLink: "https://github.com/icssc/ZotMeal",
projectLink: "",
description: "UCI Dining Hall menus and information",
image: "/projects/zotmeal.jpg",
},
Expand Down
45 changes: 26 additions & 19 deletions src/components/projects/projects-grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,32 @@ export function ProjectsGrid() {
}}
>
<div className="group aspect-video overflow-hidden rounded-t-md bg-neutral-800">
<a
href={project.projectLink ?? ""}
className={cn(
project.projectLink
? "peer cursor-pointer"
: "pointer-events-none",
"flex h-full",
)}
target="_blank"
rel="noopener noreferrer"
>
<img
src={`/assets${project.image}`}
alt={project.name}
width={800}
height={800}
className={cn("h-full w-full object-cover object-top")}
/>
</a>
{project.projectLink ? (
<a
href={project.projectLink}
className="peer flex h-full cursor-pointer"
target="_blank"
rel="noopener noreferrer"
>
<img
src={`/assets${project.image}`}
alt={project.name}
width={800}
height={800}
className={cn("h-full w-full object-cover object-top")}
/>
</a>
) : (
<div className="flex h-full">
<img
src={`/assets${project.image}`}
alt={project.name}
width={800}
height={800}
className={cn("h-full w-full object-cover object-top")}
/>
</div>
)}
</div>

<div>
Expand Down