The weeb for the next gen discord boat - Wamellow wamellow.com
bot discord
3
fork

Configure Feed

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

use built-in button loading state

Luna 640db791 5d1fa8c9

+5 -8
+5 -8
components/button-fetch.tsx
··· 1 - import { LoaderCircleIcon } from "lucide-react"; 2 1 import React, { useState } from "react"; 3 2 4 3 import { Button } from "./ui/button"; ··· 68 67 }; 69 68 70 69 return ( 71 - <div className={className} > 70 + <div className={className}> 72 71 <Button 73 72 className="w-full" 74 73 onClick={handle} ··· 79 78 } 80 79 disabled={state !== State.Idle} 81 80 size={size} 81 + loading={state === State.Loading} 82 82 > 83 - {state === State.Loading 84 - ? <LoaderCircleIcon className="animate-spin" /> 85 - : icon 86 - } 83 + {state !== State.Loading && icon} 87 84 {label} 88 85 </Button> 89 86 90 - {error && 87 + {error && ( 91 88 <div className="text-red-500 text-sm mt-1"> 92 89 {error} 93 90 </div> 94 - } 91 + )} 95 92 </div> 96 93 ); 97 94 }