draupnir4all-web

git clone git://archive.git.mtrnord.blog/MTRNord/draupnir4all-web.git
Log | Files | Refs | README | LICENSE

protected-rooms-list.tsx (881B)


      1 import { DraupnirBot } from "@/lib/api";
      2 import AreYouSureDialog from "../modals/are-you-sure";
      3 
      4 interface ProtectedRomsListProps {
      5     selectedBot: DraupnirBot;
      6 }
      7 
      8 export default function ProtectedRomsList({ selectedBot }: ProtectedRomsListProps) {
      9     return (
     10         <div className="p-4 space-y-3">
     11             {selectedBot.protectedRooms.map((room, index) => (
     12                 <div key={index} className="flex items-center justify-between p-3 px-4 rounded-md bg-gray-900">
     13                     <div>
     14                         <p>{room.displayName ?? room.room}</p>
     15                         {room.displayName && <p className="text-xs text-gray-400">{room.room}</p>}
     16                     </div>
     17                     <AreYouSureDialog titlePart="Protected Room" description="Are you sure you want to unprotect the room?" />
     18                 </div>
     19             ))}
     20         </div>
     21     )
     22 }