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

Add "maintained by SIPB" badge #80

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
Binary file added public/fuzzball.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import "./App.scss";
import { MatrixLink } from "./MatrixLink";
import { useICSExport } from "../lib/gapi";
import { CalendarIcon } from "@chakra-ui/icons";
import { SIPBLogo } from "./SIPBLogo";

type SemesterData = {
classes: { [cls: string]: RawClass };
Expand Down Expand Up @@ -96,7 +97,7 @@ function useHydrant(): {
/**
* "Integration callbacks" allow other SIPB projects to integrate with Hydrant by redirecting to
* https://hydrant.mit.edu/#/export with a `callback` as a query parameter.
*
*
* Currently, the only application that uses this is the Matrix class group chat picker,
* but in the future, a prompt "[Application name] would like to access your Hydrant class list"
* could be implemented.
Expand All @@ -120,7 +121,7 @@ function HydrantApp() {
useEffect(() => {
// only trigger this code if the URL asked for it
if (!hasIntegrationCallback) return;

// wait until Hydrant loads
if (!hydrant) return;

Expand Down Expand Up @@ -205,6 +206,7 @@ function HydrantApp() {
</Button>
</Tooltip>
<MatrixLink selectedActivities={state.selectedActivities}/>
<SIPBLogo/>
</HStack>
</Center>
<SelectedActivities
Expand Down
25 changes: 25 additions & 0 deletions src/components/SIPBLogo.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Button, Image } from "@chakra-ui/react";

export function SIPBLogo() {
return (
<a
href="https://sipb.mit.edu/"
target="_blank"
rel="noreferrer"
>
<Button
colorScheme="gray"
rightIcon={
<Image
src="/fuzzball.png"
alt="SIPB Logo"
height={6}
/>
}
size="sm"
>
Maintained by SIPB
</Button>
</a>
);
}