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

Refactor course id into env var #145

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

Conversation

ShreyasKallingal
Copy link
Contributor

Extremely significant contribution that allows courses to rebrand the queue. Let me know if you'd like to keep the 61B™️ branding somewhere though :)

Also, explicitly included the minimum node version in package-json.

Copy link

vercel bot commented Apr 4, 2024

@ShreyasKallingal is attempting to deploy a commit to the cs61b's Team Team on Vercel.

A member of the Team first needs to authorize it.

@ShreyasKallingal ShreyasKallingal marked this pull request as draft April 4, 2024 09:50
@ShreyasKallingal ShreyasKallingal marked this pull request as ready for review April 4, 2024 10:12
@MeshanKhosla
Copy link
Collaborator

MeshanKhosla commented Apr 4, 2024

Lets also add it here to require this at build time https://github.com/Berkeley-CS61B/simple-office-hours-queue/blob/main/src/env/schema.mjs

@ShreyasKallingal
Copy link
Contributor Author

Fixed!

@MeshanKhosla
Copy link
Collaborator

Also clientEnv should be

export const clientEnv = {
  NEXT_PUBLIC_ABLY_CLIENT_API_KEY: process.env.NEXT_PUBLIC_ABLY_CLIENT_API_KEY,
  NEXT_PUBLIC_COURSE_ID: process.env.NEXT_PUBLIC_COURSE_ID,
};

and then we can change cosntants.ts to be

import { clientEnv } from "../env/schema.mjs";

export const COURSE_ID = clientEnv.NEXT_PUBLIC_COURSE_ID!;

just to stay consistent

@ShreyasKallingal
Copy link
Contributor Author

Ah got it, fixed.

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