Skip to content

Commit 87588a7

Browse files
authored
Merge pull request #700 from UTDNebula/new-tab-branch
Side-bar opens a New tab
2 parents e5c8186 + 9df86d8 commit 87588a7

File tree

17 files changed

+32
-27
lines changed

17 files changed

+32
-27
lines changed

src/components/BetaBanner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const BetaBanner: FC = () => {
1010
e.preventDefault();
1111
window.open('https://forms.gle/wx4zxm3cemut31tNA', '_blank');
1212
}}
13-
className="flex items-center justify-center rounded-md bg-white px-2 py-1 font-medium hover:bg-gray-50"
13+
className="flex items-center justify-center rounded-md bg-white px-2 py-1 font-medium hover:bg-gray-50 cursor-pointer"
1414
>
1515
Report a bug
1616
</button>
@@ -25,7 +25,7 @@ const BetaBanner: FC = () => {
2525
'_blank',
2626
);
2727
}}
28-
className="flex items-center justify-center rounded-md bg-white px-2 py-1 font-medium hover:bg-gray-50"
28+
className="flex items-center justify-center rounded-md bg-white px-2 py-1 font-medium hover:bg-gray-50 cursor-pointer"
2929
>
3030
Learn more
3131
</button>

src/components/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const Button: FC<ButtonProps> = ({
4949
return (
5050
<button
5151
{...props}
52-
className={`relative ${colorClasses[color]} ${sizeClasses[size]} flex h-fit ${widthClasses[width]} ${fontClasses[font]} items-center justify-center rounded-md transition duration-200 ease-in-out ${className} disabled:opacity-50`}
52+
className={`relative ${colorClasses[color]} ${sizeClasses[size]} flex h-fit ${widthClasses[width]} ${fontClasses[font]} items-center justify-center rounded-md transition duration-200 ease-in-out ${className} disabled:opacity-50 cursor-pointer`}
5353
>
5454
{icon && <span className={isLoading ? 'opacity-0' : ''}>{icon}</span>}
5555
{Children.count(children) > 0 && (

src/components/home/Home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default function PlansPage() {
109109
<button
110110
id="tutorial-2"
111111
data-testid="add-new-plan-btn"
112-
className="flex h-12 flex-row items-center gap-4 rounded-md bg-primary p-6 text-white transition-all hover:bg-primary-600 active:bg-primary-600"
112+
className="flex h-12 flex-row items-center gap-4 rounded-md bg-primary p-6 text-white transition-all hover:bg-primary-600 active:bg-primary-600 cursor-pointer"
113113
>
114114
<PlusIcon />
115115
<p>Add New Plan</p>

src/components/home/Sidebar.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,19 @@ export default function Sidebar({ isMobile }: { isMobile: boolean }) {
2828
url: '/app/home',
2929
label: 'Dashboard',
3030
Icon: HomeIcon,
31+
newTab: false,
3132
},
3233
{
3334
url: '/app/profile',
3435
label: 'Profile',
3536
Icon: ProfileIcon,
37+
newTab: false,
3638
},
3739
{
3840
url: 'https://discord.utdnebula.com/',
3941
label: 'Join Our Discord',
4042
Icon: GlobalIcon,
43+
newTab: true,
4144
},
4245
];
4346

@@ -65,8 +68,8 @@ export default function Sidebar({ isMobile }: { isMobile: boolean }) {
6568
</div>
6669
)}
6770
<ul className="flex flex-col gap-y-[25px]">
68-
{sidebarItems.map(({ url, label, Icon }, i) => (
69-
<Link key={url + i} href={url}>
71+
{sidebarItems.map(({ url, label, Icon, newTab }, i) => (
72+
<Link key={url + i} href={url} target={newTab ? '_blank' : ''}>
7073
<li
7174
className={`${
7275
router.pathname === url && 'rounded-lg bg-primary font-medium text-white'
@@ -83,7 +86,7 @@ export default function Sidebar({ isMobile }: { isMobile: boolean }) {
8386
<div className="grow"></div>
8487

8588
<button
86-
className="mx-4 flex items-center gap-6 px-5 pb-5 align-bottom"
89+
className="mx-4 flex items-center gap-6 px-5 pb-5 align-bottom cursor-pointer"
8790
onClick={() => signOut()}
8891
>
8992
<LogoutIcon className="h-6 w-6" />

src/components/landing/PlanCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default function PlanCard({ id, name, major }: PlanCardProps) {
4040
<div className="relative w-full rounded-2xl border-b-12 border-[#A3A3A3] border-b-primary bg-white text-[#1C2A6D] transition-all hover:scale-110 hover:border-b-0 hover:bg-primary hover:text-white">
4141
<button
4242
onClick={handlePlanClick}
43-
className="flex h-[180px] w-full flex-col px-8 py-6 text-left"
43+
className="flex h-[180px] w-full flex-col px-8 py-6 text-left cursor-pointer"
4444
>
4545
<div className="flex w-full flex-row items-center justify-between">
4646
<h4 className="overflow-hidden text-ellipsis whitespace-nowrap text-[15px] font-normal ">
@@ -52,7 +52,7 @@ export default function PlanCard({ id, name, major }: PlanCardProps) {
5252
>
5353
<button
5454
aria-label="Customise options"
55-
className="h-10 w-10 self-stretch rounded-full hover:bg-neutral-200 hover:text-black"
55+
className="h-10 w-10 self-stretch rounded-full hover:bg-neutral-200 hover:text-black cursor-pointer"
5656
>
5757
<DotsHorizontalIcon className="m-auto rotate-90" />
5858
</button>

src/components/planner/CourseInfoHoverCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const CourseDescription = ({ description }: { description: string }) => {
7070
}}
7171
/>{' '}
7272
<button
73-
className={`${showMore ? '' : 'inline'} font-medium text-primary`}
73+
className={`${showMore ? '' : 'inline'} font-medium text-primary cursor-pointer`}
7474
onClick={() => {
7575
setShowMore(!showMore);
7676
}}

src/components/planner/EditableMajor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const EditableMajor = ({
2828
<>
2929
{!editMajor ? (
3030
<button
31-
className="flex items-center gap-x-3 rounded-2xl bg-primary-100 px-3 py-2 tracking-tight"
31+
className="flex items-center gap-x-3 rounded-2xl bg-primary-100 px-3 py-2 tracking-tight cursor-pointer"
3232
onClick={() => setEditMajor(true)}
3333
>
3434
<span className="text-lg font-semibold text-primary-800" data-testid="plan-major">

src/components/planner/Sidebar/Accordion.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function Accordion({
2020
return (
2121
<div className={` rounded-md ${filled ? ' opacity-50' : ''}`}>
2222
<button
23-
className="flex w-full flex-row items-center justify-between px-2 duration-500"
23+
className="flex w-full flex-row items-center justify-between px-2 duration-500 cursor-pointer"
2424
onClick={toggleAccordion}
2525
>
2626
{header}

src/components/planner/Sidebar/RequirementsContainer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function RequirementContainerHeader({
3030
const { value, max, unit } = progress;
3131
return (
3232
<div className="flex w-full flex-row items-start justify-start">
33-
<button onClick={() => setCarousel(false)}>
33+
<button onClick={() => setCarousel(false)} className="cursor-pointer">
3434
<svg
3535
width="30"
3636
height="27"
@@ -309,6 +309,7 @@ export default function RequirementsContainer({
309309
toggleCarousel();
310310
setRequirementIdx(idx);
311311
}}
312+
className="cursor-pointer"
312313
>
313314
<div
314315
className="flex items-center justify-between gap-x-4 rounded-md border border-neutral-300 px-5 py-4"

src/components/planner/Tiles/SemesterTile.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ export const MemoizedSemesterTile = memo(
131131
>
132132
{displaySemesterCode(semester.code)}
133133
</h3>
134-
<button onClick={() => handleSemesterLock(semester.id.toString(), !semester.locked)}>
134+
<button
135+
onClick={() => handleSemesterLock(semester.id.toString(), !semester.locked)}
136+
className="cursor-pointer"
137+
>
135138
{!semester.locked ? <UnlockedIcon /> : <LockIcon />}
136139
</button>
137140
</div>

0 commit comments

Comments
 (0)