diff --git a/apps/web/src/app/layout.tsx b/apps/web/src/app/layout.tsx index cc6dd46..df3f733 100644 --- a/apps/web/src/app/layout.tsx +++ b/apps/web/src/app/layout.tsx @@ -31,7 +31,7 @@ export default function RootLayout({
-
+
{children}
diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsx index 1865ce7..0040bf7 100644 --- a/apps/web/src/app/page.tsx +++ b/apps/web/src/app/page.tsx @@ -1,5 +1,8 @@ "use client"; +import { Badge } from "@repo/ui/components/ui/badge"; +import { Label } from "@repo/ui/components/ui/label"; +import Link from "next/link"; import { useRouter } from "next/navigation"; import { useEffect, useState } from "react"; import { getAddress } from "viem"; @@ -34,10 +37,16 @@ export default function Page() { return (
- + + + + ); } + +function ContractLinks({ + council, + pool, +}: { council: string | undefined; pool: string | undefined }) { + return ( +
+ + + + Council + + + + + Pool + + +
+ ); +} diff --git a/apps/web/src/hooks/useCouncil.ts b/apps/web/src/hooks/useCouncil.ts index acdeffa..6629342 100644 --- a/apps/web/src/hooks/useCouncil.ts +++ b/apps/web/src/hooks/useCouncil.ts @@ -8,6 +8,7 @@ export const useCouncil = (council: `0x${string}` | undefined) => { query CouncilNameAndGrantees($council: String) { council(id: $council) { councilName + pool grantees { name account @@ -20,6 +21,7 @@ export const useCouncil = (council: `0x${string}` | undefined) => { councilName: string; grantees: { name: string; account: `0x${string}` }[]; maxAllocationsPerMember: number; + pool: string; }; }>({ queryKey: ["data"], diff --git a/bun.lockb b/bun.lockb index 41a17e8..1a5084d 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/packages/ui/package.json b/packages/ui/package.json index f98c682..47bd813 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -20,6 +20,7 @@ "typescript": "^5" }, "dependencies": { + "@radix-ui/react-label": "^2.1.0", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-toast": "^1.2.1", "class-variance-authority": "^0.7.0", diff --git a/packages/ui/src/components/ui/badge.tsx b/packages/ui/src/components/ui/badge.tsx new file mode 100644 index 0000000..a331e9c --- /dev/null +++ b/packages/ui/src/components/ui/badge.tsx @@ -0,0 +1,36 @@ +import { type VariantProps, cva } from "class-variance-authority"; +import type * as React from "react"; + +import { cn } from "@repo/ui/lib/utils"; + +const badgeVariants = cva( + "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", + { + variants: { + variant: { + default: + "border-transparent bg-primary text-primary-foreground hover:bg-primary/80", + secondary: + "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80", + destructive: + "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80", + outline: "text-foreground", + }, + }, + defaultVariants: { + variant: "default", + }, + }, +); + +export interface BadgeProps + extends React.HTMLAttributes, + VariantProps {} + +function Badge({ className, variant, ...props }: BadgeProps) { + return ( +
+ ); +} + +export { Badge, badgeVariants }; diff --git a/packages/ui/src/components/ui/label.tsx b/packages/ui/src/components/ui/label.tsx new file mode 100644 index 0000000..99cc882 --- /dev/null +++ b/packages/ui/src/components/ui/label.tsx @@ -0,0 +1,26 @@ +"use client"; + +import * as LabelPrimitive from "@radix-ui/react-label"; +import { type VariantProps, cva } from "class-variance-authority"; +import * as React from "react"; + +import { cn } from "@repo/ui/lib/utils"; + +const labelVariants = cva( + "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", +); + +const Label = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef & + VariantProps +>(({ className, ...props }, ref) => ( + +)); +Label.displayName = LabelPrimitive.Root.displayName; + +export { Label };