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.

fix some modal issues & add isDisabled

Luna 4c0e6465 67ab83d8

+13 -5
+13 -5
components/modal.tsx
··· 29 29 onClose: () => void; 30 30 31 31 isOpen: boolean; 32 + isDisabled?: boolean; 33 + 32 34 buttonName?: string; 33 35 } 34 36 ··· 44 46 onSuccess, 45 47 46 48 isOpen, 49 + isDisabled, 50 + 47 51 buttonName = "Submit" 48 52 }: Props<T>) { 49 53 const [state, setState] = useState<State>(State.Idle); 50 54 const [error, setError] = useState<string | null>(null); 51 55 52 56 useEffect(() => { 57 + setError(null); 58 + setState(State.Idle); 59 + 53 60 const html = document.getElementsByTagName("html")?.[0]; 54 61 if (isOpen) { 55 - html.style.overflow = "hidden"; 62 + html.style.overflow = document.body.style.overflow = "hidden"; 56 63 } else { 57 - html.style.overflow = "auto"; 64 + html.style.overflow = document.body.style.overflow = "auto"; 58 65 } 59 66 60 67 return () => { 61 - html.style.overflow = "auto"; 68 + html.style.overflow = document.body.style.overflow = "auto"; 62 69 }; 63 70 }, [isOpen]); 64 71 ··· 137 144 "ml-auto text-sm font-medium dark:text-neutral-200 text-neutral-800", 138 145 state === State.Idle && "cursort-not-allowed" 139 146 )} 140 - disabled={state === State.Idle} 147 + disabled={state !== State.Idle} 141 148 > 142 149 Cancel 143 150 </button> ··· 148 155 onClick={() => submit()} 149 156 className={cn(!onSubmit && "ml-auto")} 150 157 isLoading={state === State.Loading} 158 + isDisabled={isDisabled} 151 159 > 152 160 {buttonName} 153 161 </Button> ··· 197 205 198 206 <div 199 207 className={cn( 200 - "scrollbar-none p-0.5 pb-8 md:pb-4 sm:max-h-[512px] max-h-[420px] overflow-y-scroll md:overflow-visible", 208 + "scrollbar-none p-0.5 pb-8 md:pb-4 max-h-[512px] overflow-y-scroll md:overflow-y-visible overflow-x-hidden", 201 209 className 202 210 )} 203 211 >