Skip to content

Commit b23a4e2

Browse files
committed
Merge branch 'kl/scrum-168-image-enhancements' of https://github.com/UTSC-CSCC01-Software-Engineering-I/term-group-project-c01w25-project-course-matrix into kl/scrum-168-image-enhancements
2 parents cece8bc + 48d3241 commit b23a4e2

File tree

7 files changed

+103
-106
lines changed

7 files changed

+103
-106
lines changed

course-matrix/frontend/src/components/UserMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export function UserMenu({ setOpen }: UserMenuProps) {
111111
{username}
112112
<Avatar>
113113
{/* Avatar Image is the profile picture of the user. The default avatar is used as a placeholder for now. */}
114-
<AvatarImage src="/img/grey-avatar.png" className="h-18 w-18"/>
114+
<AvatarImage src="/img/grey-avatar.png" className="h-18 w-18" />
115115
{/* Avatar Fallback is the initials of the user. Avatar Fallback will be used if Avatar Image fails to load */}
116116
<AvatarFallback>{initials}</AvatarFallback>
117117
</Avatar>

course-matrix/frontend/src/components/ui/toast.tsx

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import * as React from "react"
2-
import * as ToastPrimitives from "@radix-ui/react-toast"
3-
import { cva, type VariantProps } from "class-variance-authority"
4-
import { X } from "lucide-react"
1+
import * as React from "react";
2+
import * as ToastPrimitives from "@radix-ui/react-toast";
3+
import { cva, type VariantProps } from "class-variance-authority";
4+
import { X } from "lucide-react";
55

6-
import { cn } from "@/lib/utils"
6+
import { cn } from "@/lib/utils";
77

8-
const ToastProvider = ToastPrimitives.Provider
8+
const ToastProvider = ToastPrimitives.Provider;
99

1010
const ToastViewport = React.forwardRef<
1111
React.ElementRef<typeof ToastPrimitives.Viewport>,
@@ -15,12 +15,12 @@ const ToastViewport = React.forwardRef<
1515
ref={ref}
1616
className={cn(
1717
"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",
18-
className
18+
className,
1919
)}
2020
{...props}
2121
/>
22-
))
23-
ToastViewport.displayName = ToastPrimitives.Viewport.displayName
22+
));
23+
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
2424

2525
const toastVariants = cva(
2626
"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
@@ -35,8 +35,8 @@ const toastVariants = cva(
3535
defaultVariants: {
3636
variant: "default",
3737
},
38-
}
39-
)
38+
},
39+
);
4040

4141
const Toast = React.forwardRef<
4242
React.ElementRef<typeof ToastPrimitives.Root>,
@@ -49,9 +49,9 @@ const Toast = React.forwardRef<
4949
className={cn(toastVariants({ variant }), className)}
5050
{...props}
5151
/>
52-
)
53-
})
54-
Toast.displayName = ToastPrimitives.Root.displayName
52+
);
53+
});
54+
Toast.displayName = ToastPrimitives.Root.displayName;
5555

5656
const ToastAction = React.forwardRef<
5757
React.ElementRef<typeof ToastPrimitives.Action>,
@@ -61,12 +61,12 @@ const ToastAction = React.forwardRef<
6161
ref={ref}
6262
className={cn(
6363
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",
64-
className
64+
className,
6565
)}
6666
{...props}
6767
/>
68-
))
69-
ToastAction.displayName = ToastPrimitives.Action.displayName
68+
));
69+
ToastAction.displayName = ToastPrimitives.Action.displayName;
7070

7171
const ToastClose = React.forwardRef<
7272
React.ElementRef<typeof ToastPrimitives.Close>,
@@ -76,15 +76,15 @@ const ToastClose = React.forwardRef<
7676
ref={ref}
7777
className={cn(
7878
"absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",
79-
className
79+
className,
8080
)}
8181
toast-close=""
8282
{...props}
8383
>
8484
<X className="h-4 w-4" />
8585
</ToastPrimitives.Close>
86-
))
87-
ToastClose.displayName = ToastPrimitives.Close.displayName
86+
));
87+
ToastClose.displayName = ToastPrimitives.Close.displayName;
8888

8989
const ToastTitle = React.forwardRef<
9090
React.ElementRef<typeof ToastPrimitives.Title>,
@@ -95,8 +95,8 @@ const ToastTitle = React.forwardRef<
9595
className={cn("text-sm font-semibold", className)}
9696
{...props}
9797
/>
98-
))
99-
ToastTitle.displayName = ToastPrimitives.Title.displayName
98+
));
99+
ToastTitle.displayName = ToastPrimitives.Title.displayName;
100100

101101
const ToastDescription = React.forwardRef<
102102
React.ElementRef<typeof ToastPrimitives.Description>,
@@ -107,12 +107,12 @@ const ToastDescription = React.forwardRef<
107107
className={cn("text-sm opacity-90", className)}
108108
{...props}
109109
/>
110-
))
111-
ToastDescription.displayName = ToastPrimitives.Description.displayName
110+
));
111+
ToastDescription.displayName = ToastPrimitives.Description.displayName;
112112

113-
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>
113+
type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
114114

115-
type ToastActionElement = React.ReactElement<typeof ToastAction>
115+
type ToastActionElement = React.ReactElement<typeof ToastAction>;
116116

117117
export {
118118
type ToastProps,
@@ -124,4 +124,4 @@ export {
124124
ToastDescription,
125125
ToastClose,
126126
ToastAction,
127-
}
127+
};

course-matrix/frontend/src/components/ui/toaster.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import { useToast } from "@/hooks/use-toast"
1+
import { useToast } from "@/hooks/use-toast";
22
import {
33
Toast,
44
ToastClose,
55
ToastDescription,
66
ToastProvider,
77
ToastTitle,
88
ToastViewport,
9-
} from "@/components/ui/toast"
9+
} from "@/components/ui/toast";
1010

1111
export function Toaster() {
12-
const { toasts } = useToast()
12+
const { toasts } = useToast();
1313

1414
return (
1515
<ToastProvider>
@@ -25,9 +25,9 @@ export function Toaster() {
2525
{action}
2626
<ToastClose />
2727
</Toast>
28-
)
28+
);
2929
})}
3030
<ToastViewport />
3131
</ToastProvider>
32-
)
32+
);
3333
}

0 commit comments

Comments
 (0)