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
9 changes: 9 additions & 0 deletions app/board/board.css
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,15 @@
background: var(--bg);
color: var(--accent);
}
.board .btn-small {
display: inline-block;
padding: 4px 12px;
font-weight: 600;
text-decoration: none;
}
.board .other-hub {
margin: 0 0 18px;
}
.board form.stack {
display: grid;
gap: 14px;
Expand Down
2 changes: 2 additions & 0 deletions components/board/BoardLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { useState, type FormEvent } from "react";
import { useRouter } from "next/navigation";
import { chapterConfig, type ChapterId } from "@/lib/board/chapters";
import { OtherHub } from "./OtherHub";
import { api, setApiChapter } from "./util";

export function BoardLogin({ chapter }: { chapter: ChapterId }) {
Expand All @@ -28,6 +29,7 @@ export function BoardLogin({ chapter }: { chapter: ChapterId }) {
<main className="wrap">
<h1>VINDICATED</h1>
<p className="sub">{config.loginSub}</p>
<OtherHub chapter={config} />
<form className="stack login" onSubmit={submit} noValidate>
<label htmlFor="board-password">
Board password
Expand Down
2 changes: 2 additions & 0 deletions components/board/HomeTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useState } from "react";
import type { Announcement, SendSummary, Tab } from "@/lib/board/types";
import { useBoard } from "./BoardApp";
import { AnnouncementForm } from "./AnnouncementForm";
import { OtherHub } from "./OtherHub";
import { EditLink, KeyDatesEditor, PhotosEditor, QuickLinksEditor } from "./Editors";
import { roundTasks, inLeadership } from "./derive";
import { apiCall, daysBetween, fmt, photoSrc } from "./util";
Expand All @@ -29,6 +30,7 @@ export function HomeTab() {

return (
<section>
<OtherHub chapter={chapter} />
{editing === "photos" ? (
<PhotosEditor onDone={close} />
) : (
Expand Down
15 changes: 15 additions & 0 deletions components/board/OtherHub.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { ChapterConfig } from "@/lib/board/chapters";

// One line for people who opened the other chapter's hub. A plain link, not
// a client-side route change, so the other hub loads with its own sign-in.
export function OtherHub({ chapter }: { chapter: ChapterConfig }) {
const { prompt, label, path } = chapter.otherHub;
return (
<p className="other-hub">
{prompt}{" "}
<a className="btn btn-line btn-small" href={path}>
{label}
</a>
</p>
);
}
4 changes: 4 additions & 0 deletions lib/board/chapters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export type ChapterConfig = {
loginSub: string;
// Who members are told to ask when something isn't set up.
contact: string;
// For people who landed on the wrong hub: shown on sign-in and Home.
otherHub: { prompt: string; label: string; path: string };
roleLabels: Record<string, string>;
teams: readonly string[];
rule: string | null;
Expand Down Expand Up @@ -64,6 +66,7 @@ const BERKELEY: ChapterConfig = {
term: TERM,
loginSub: "UC Berkeley chapter board",
contact: "Rana",
otherHub: { prompt: "Why am I on this chuz school's page?", label: "Take me to UCLA's hub", path: "/board/ucla" },
roleLabels: { admin: "admin", socials: "socials editor", member: "board member" },
teams: TEAM_ORDER,
rule: RULE,
Expand Down Expand Up @@ -137,6 +140,7 @@ const UCLA: ChapterConfig = {
term: "UCLA chapter · Board hub, Fall 2026",
loginSub: "UCLA chapter board hub",
contact: "Fiona",
otherHub: { prompt: "Why am I on this chuz school's page?", label: "Take me to Berkeley's hub", path: "/board" },
roleLabels: { admin: "admin", member: "member" },
teams: ["Data", "Research", "App Dev", "Design", "Technical Writing", "High School"],
rule: null,
Expand Down