this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: one shot button

+21 -2
+18
src/components/fused-button.tsx
··· 1 + "use client"; 2 + 3 + import { useState } from "react"; 4 + import { Button } from "@/components/ui/button"; 5 + 6 + export function FusedButton({ 7 + onClick, 8 + ...props 9 + }: React.ComponentProps<typeof Button>) { 10 + const [spent, setSpent] = useState(false); 11 + return ( 12 + <Button 13 + {...props} 14 + disabled={spent || props.disabled} 15 + onClick={(e) => (setSpent(true), onClick?.(e))} 16 + /> 17 + ); 18 + }
+3 -2
src/components/group.tsx
··· 18 18 import Link from "next/link"; 19 19 import { useState } from "react"; 20 20 import CustomAvatar from "@/components/avatar"; 21 + import { FusedButton } from "@/components/fused-button"; 21 22 import { Button } from "@/components/ui/button"; 22 23 import { ButtonGroup } from "@/components/ui/button-group"; 23 24 import { ··· 318 319 </DialogContent> 319 320 </Dialog> 320 321 )) || ( 321 - <Button 322 + <FusedButton 322 323 variant="outline" 323 324 onClick={(e) => { 324 325 e.preventDefault(); ··· 338 339 > 339 340 <HugeiconsIcon icon={Ticket02Icon} /> 340 341 Redeem 341 - </Button> 342 + </FusedButton> 342 343 )} 343 344 </ItemActions> 344 345 </Item>