refactor: tweak UIs

This commit is contained in:
Tristan Yang
2023-05-15 13:18:42 +08:00
parent a71a00d493
commit c6edf3e8b1
3 changed files with 8 additions and 6 deletions
+6 -4
View File
@@ -25,13 +25,15 @@ const InviteModal: FC<Props> = ({ type = "server", cid, title = "", closeModal }
const finalTitle = type == "server" ? server.name : `#${title || channel?.name}`;
return (
<Modal>
<div className="flex flex-col bg-white dark:bg-gray-900 rounded-lg p-4 max-h-[85vh] overflow-y-scroll md:min-w-[408px] relative">
<h2 className="flex items-center justify-between text-lg text-gray-700 dark:text-gray-50">
<div className="flex flex-col bg-white dark:bg-gray-900 rounded-lg max-h-[85vh] overflow-y-scroll md:min-w-[408px] relative">
<h2 className="z-50 p-4 bg-white dark:bg-gray-900 flex items-center justify-between text-lg text-gray-700 dark:text-gray-50 sticky top-0">
{t("invite_title", { name: finalTitle })}
<CloseIcon className="cursor-pointer dark:fill-white" onClick={closeModal} />
</h2>
{!channel?.is_public && <AddMembers cid={cid} closeModal={closeModal} />}
<InviteByEmail cid={channel?.is_public ? undefined : cid} />
<div className="px-4 pb-4">
{!channel?.is_public && <AddMembers cid={cid} closeModal={closeModal} />}
<InviteByEmail cid={channel?.is_public ? undefined : cid} />
</div>
</div>
</Modal>
);