Skip to content

Commit

Permalink
simplify button text
Browse files Browse the repository at this point in the history
  • Loading branch information
dtemkin1 committed Dec 10, 2024
1 parent caced65 commit a147d04
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 44 deletions.
19 changes: 9 additions & 10 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function HydrantApp() {
/>
<LeftFooter state={hydrant} />
</Flex>
<Flex direction="column" w={{ base: "100%", lg: "50%" }} gap={8}>
<Flex direction="column" w={{ base: "100%", lg: "50%" }} gap={6}>
<Center>
<Group wrap="wrap" justifyContent="center" gap={2}>
<TermSwitcher state={hydrant} />
Expand All @@ -196,21 +196,20 @@ function HydrantApp() {
<Image src={calendarButtonImg} alt="Sign in with Google" />
)}
</Tooltip> */}
<Tooltip
content={
isExporting
? "Loading..."
: "Currently, only manually exporting to an .ics file is supported. "
}
>
<Tooltip content="Currently, only manually exporting to an .ics file is supported.">
<Button
colorPalette="blue"
variant="solid"
size="sm"
onClick={onICSExport}
loading={isExporting}
loadingText="Loading..."
onClick={() => {
setIsExporting(true);
onICSExport();
}}
>
<LuCalendar />
{isExporting ? <Spinner m={3} /> : "Import to my calendar"}
Export calendar
</Button>
</Tooltip>
<MatrixLink selectedActivities={state.selectedActivities} />
Expand Down
5 changes: 2 additions & 3 deletions src/components/MatrixLink.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Activity } from "../lib/activity";
import { Class } from "../lib/class";
import { LuMessageSquare, LuExternalLink } from "react-icons/lu";
import { LuMessageSquare } from "react-icons/lu";

import { Tooltip } from "./ui/tooltip";
import { LinkButton } from "./ui/link-button";
Expand Down Expand Up @@ -29,8 +29,7 @@ export function MatrixLink(props: { selectedActivities: Array<Activity> }) {
fontWeight={"semibold"}
>
<LuMessageSquare />
Join group chats on Matrix
<LuExternalLink />
Join Matrix group chats
</LinkButton>
</Tooltip>
);
Expand Down
28 changes: 15 additions & 13 deletions src/components/PreregLink.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Activity } from "../lib/activity";
import { Class } from "../lib/class";
import { LuClipboardList, LuExternalLink } from "react-icons/lu";
import { LuClipboardList } from "react-icons/lu";

import { LinkButton } from "./ui/link-button";
import { Tooltip } from "./ui/tooltip";

/** A link to SIPB Matrix's class group chat importer UI */
export function PreregLink(props: { selectedActivities: Array<Activity> }) {
Expand All @@ -18,17 +19,18 @@ export function PreregLink(props: { selectedActivities: Array<Activity> }) {
.join(",")}`;

return (
<LinkButton
colorPalette="red"
size="sm"
href={matrixLink}
target="_blank"
rel="noreferrer"
fontWeight={"semibold"}
>
<LuClipboardList />
Pre-register for these classes
<LuExternalLink />
</LinkButton>
<Tooltip content="This will import your current schedule into WebSIS.">
<LinkButton
colorPalette="red"
size="sm"
href={matrixLink}
target="_blank"
rel="noreferrer"
fontWeight={"semibold"}
>
<LuClipboardList />
Pre-register classes
</LinkButton>
</Tooltip>
);
}
30 changes: 12 additions & 18 deletions src/components/SIPBLogo.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
import { Flex, Image, Link, LinkBox, LinkOverlay } from "@chakra-ui/react";
import { Image, Link } from "@chakra-ui/react";
import sipbLogo from "../assets/fuzzball.png";

export function SIPBLogo() {
return (
<LinkBox>
<Flex direction="row" gap={2}>
<LinkOverlay asChild>
<Link
variant="subtle"
href="https://sipb.mit.edu/"
target="_blank"
rel="noreferrer"
fontSize="sm"
fontWeight="500"
>
by SIPB
</Link>
</LinkOverlay>
<Image src={sipbLogo} alt="SIPB Logo" height="1lh" />
</Flex>
</LinkBox>
<Link
variant="plain"
href="https://sipb.mit.edu/"
target="_blank"
rel="noreferrer"
fontSize="sm"
fontWeight="500"
>
by SIPB
<Image src={sipbLogo} alt="SIPB Logo" height="1lh" />
</Link>
);
}

0 comments on commit a147d04

Please sign in to comment.