Skip to content

Commit a6f7c3a

Browse files
committed
Profile + edit pages added (still messy with inline CSS)
1 parent 8d0bc50 commit a6f7c3a

31 files changed

Lines changed: 7714 additions & 6 deletions

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@
99
"typescript.tsdk": "${workspaceFolder}/client/node_modules/typescript/lib",
1010
"shellcheck.ignorePatterns": {
1111
"**/.env*": true
12+
},
13+
"[typescriptreact]": {
14+
"editor.defaultFormatter": "vscode.typescript-language-features"
1215
}
1316
}

client/package-lock.json

Lines changed: 178 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
"prepare": "cd .. && husky client/.husky"
1616
},
1717
"dependencies": {
18+
"@radix-ui/react-avatar": "^1.1.11",
1819
"@radix-ui/react-navigation-menu": "^1.2.14",
19-
"@radix-ui/react-slot": "^1.2.3",
20+
"@radix-ui/react-separator": "^1.1.8",
21+
"@radix-ui/react-slot": "^1.2.4",
2022
"@tanstack/react-query": "^5.80.7",
2123
"@tanstack/react-query-devtools": "^5.80.7",
2224
"autoprefixer": "^10.4.21",

client/public/test.png

39.5 KB
Loading
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
2+
import * as React from "react";
3+
4+
import { cn } from "@/lib/utils";
5+
6+
const Avatar = React.forwardRef<
7+
React.ElementRef<typeof AvatarPrimitive.Root>,
8+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
9+
>(({ className, ...props }, ref) => (
10+
<AvatarPrimitive.Root
11+
ref={ref}
12+
className={cn(
13+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
14+
className,
15+
)}
16+
{...props}
17+
/>
18+
));
19+
Avatar.displayName = AvatarPrimitive.Root.displayName;
20+
21+
const AvatarImage = React.forwardRef<
22+
React.ElementRef<typeof AvatarPrimitive.Image>,
23+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
24+
>(({ className, ...props }, ref) => (
25+
<AvatarPrimitive.Image
26+
ref={ref}
27+
className={cn("aspect-square h-full w-full", className)}
28+
{...props}
29+
/>
30+
));
31+
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
32+
33+
const AvatarFallback = React.forwardRef<
34+
React.ElementRef<typeof AvatarPrimitive.Fallback>,
35+
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
36+
>(({ className, ...props }, ref) => (
37+
<AvatarPrimitive.Fallback
38+
ref={ref}
39+
className={cn(
40+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
41+
className,
42+
)}
43+
{...props}
44+
/>
45+
));
46+
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
47+
48+
export { Avatar, AvatarFallback,AvatarImage };

client/src/components/ui/badge.tsx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { cva, type VariantProps } from "class-variance-authority";
2+
import * as React from "react";
3+
4+
import { cn } from "@/lib/utils";
5+
6+
const badgeVariants = cva(
7+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
8+
{
9+
variants: {
10+
variant: {
11+
default:
12+
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
13+
secondary:
14+
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
15+
destructive:
16+
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
17+
outline: "text-foreground",
18+
},
19+
},
20+
defaultVariants: {
21+
variant: "default",
22+
},
23+
},
24+
);
25+
26+
export interface BadgeProps
27+
extends React.HTMLAttributes<HTMLDivElement>,
28+
VariantProps<typeof badgeVariants> {}
29+
30+
function Badge({ className, variant, ...props }: BadgeProps) {
31+
return (
32+
<div className={cn(badgeVariants({ variant }), className)} {...props} />
33+
);
34+
}
35+
36+
export { Badge, badgeVariants };

0 commit comments

Comments
 (0)