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.

improve notification channel selector

Luna e700b3bb 25ac0020

+6 -11
+5 -10
app/dashboard/[guildId]/notifications/channel-selector.component.tsx
··· 7 7 8 8 import { guildStore } from "@/common/guilds"; 9 9 import { ApiV1GuildsModulesNotificationsGetResponse } from "@/typings"; 10 + import cn from "@/utils/cn"; 10 11 11 12 import CreateNotification, { Style } from "./create.component"; 12 13 import DeleteNotification from "./delete.component"; ··· 36 37 <Channel 37 38 key={"notification-" + notification.id} 38 39 notification={notification} 39 - onClick={() => setNotificationId(notification.id)} 40 40 > 41 41 <Button 42 42 color="secondary" ··· 57 57 } 58 58 </div> 59 59 60 - <div className="flex items-start justify-between w-full mt-3"> 60 + <div className={cn("flex items-start justify-between w-full", notifications.length && "mt-3")}> 61 61 <CreateNotification 62 62 guildId={guild?.id as string} 63 63 style={Style.Compact} ··· 91 91 92 92 function Channel({ 93 93 notification, 94 - children, 95 - onClick 94 + children 96 95 }: { 97 96 notification: ApiV1GuildsModulesNotificationsGetResponse; 98 97 children: React.ReactNode; 99 - onClick: () => void; 100 98 }) { 101 99 const guild = guildStore((g) => g); 102 100 const channel = guild?.channels?.find((channel) => channel.id === notification.channelId); 103 101 104 102 return ( 105 - <button 106 - className="flex justify-between p-4 bg-wamellow rounded-xl w-full duration-100" 107 - onClick={onClick} 108 - > 103 + <div className="flex justify-between p-4 bg-wamellow rounded-xl w-full duration-100"> 109 104 <div className="flex gap-3 items-center"> 110 105 <Image 111 106 alt={`${notification.creator.username}'s avatar`} ··· 129 124 <div className="space-x-2"> 130 125 {children} 131 126 </div> 132 - </button> 127 + </div> 133 128 ); 134 129 } 135 130
+1 -1
app/dashboard/[guildId]/notifications/delete.component.tsx
··· 46 46 <Modal 47 47 buttonName="Delete" 48 48 variant="danger" 49 - title={"Delete YouTube Notification: " + name} 49 + title={"Delete Notification: " + name} 50 50 isOpen={open} 51 51 onClose={() => setOpen(false)} 52 52 onSubmit={() => {