Skip to content

Commit f66d42b

Browse files
merge sam -> phillip. implements initial landing page
2 parents 8d0cf19 + ea035fe commit f66d42b

File tree

7 files changed

+433
-37
lines changed

7 files changed

+433
-37
lines changed

client/package-lock.json

Lines changed: 85 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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
},
1717
"dependencies": {
1818
"@radix-ui/react-navigation-menu": "^1.2.14",
19-
"@radix-ui/react-slot": "^1.2.3",
19+
"@radix-ui/react-separator": "^1.1.8",
20+
"@radix-ui/react-slot": "^1.2.4",
2021
"@tanstack/react-query": "^5.80.7",
2122
"@tanstack/react-query-devtools": "^5.80.7",
2223
"autoprefixer": "^10.4.21",

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 };
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
2+
import * as React from "react";
3+
4+
import { cn } from "@/lib/utils";
5+
6+
const Separator = React.forwardRef<
7+
React.ElementRef<typeof SeparatorPrimitive.Root>,
8+
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
9+
>(
10+
(
11+
{ className, orientation = "horizontal", decorative = true, ...props },
12+
ref,
13+
) => (
14+
<SeparatorPrimitive.Root
15+
ref={ref}
16+
decorative={decorative}
17+
orientation={orientation}
18+
className={cn(
19+
"shrink-0 bg-border",
20+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
21+
className,
22+
)}
23+
{...props}
24+
/>
25+
),
26+
);
27+
Separator.displayName = SeparatorPrimitive.Root.displayName;
28+
29+
export { Separator };
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// import { Inter as FontSans } from "next/font/google";
2+
// import { useState } from "react";
3+
4+
// import { usePings } from "@/hooks/pings";
5+
// import { cn } from "@/lib/utils";
6+
7+
// import { Button } from "../components/ui/button";
8+
// import Layout from "./layout";
9+
10+
// const fontSans = FontSans({
11+
// subsets: ["latin"],
12+
// variable: "--font-sans",
13+
// });
14+
15+
// export default function Home() {
16+
// const [clicked, setClicked] = useState(false);
17+
// const { data, isLoading } = usePings({
18+
// enabled: clicked,
19+
// });
20+
21+
// return (
22+
// <Layout>
23+
// <main
24+
// className={cn(
25+
// "flex min-h-screen flex-col items-center gap-4 p-24 font-sans",
26+
// fontSans.variable,
27+
// )}
28+
// >
29+
// <h1 className="text-3xl text-primary">Welcome Page</h1>
30+
// <Button onClick={() => setClicked(true)}>
31+
// {isLoading ? "Loading" : "Ping"}
32+
// </Button>
33+
// <p>
34+
// Response from server: <span>{data as string}</span>
35+
// </p>
36+
// </main>
37+
// </Layout>
38+
// );
39+
// }

0 commit comments

Comments
 (0)