From 068e3dd0d3b7e1ff839bc8d919e4884f120eb4bc Mon Sep 17 00:00:00 2001 From: Nikolay Bonev Date: Tue, 12 Nov 2024 16:42:23 +0200 Subject: [PATCH] improvement: adding warning about token expiration when inviting users --- app/components/shared/warning-box.tsx | 25 ++++++++++++++++++- .../settings.team.users.invite-user.tsx | 10 ++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/app/components/shared/warning-box.tsx b/app/components/shared/warning-box.tsx index f7ebbad43..a6f92b342 100644 --- a/app/components/shared/warning-box.tsx +++ b/app/components/shared/warning-box.tsx @@ -1,3 +1,4 @@ +import { useState } from "react"; import { tw } from "~/utils/tw"; export function WarningBox({ @@ -7,14 +8,36 @@ export function WarningBox({ children: JSX.Element | JSX.Element[] | string; [key: string]: any; }) { + const [visible, setVisible] = useState(true); return (
{children} +
); } diff --git a/app/routes/_layout+/settings.team.users.invite-user.tsx b/app/routes/_layout+/settings.team.users.invite-user.tsx index 91a4a8cd2..ecbed1662 100644 --- a/app/routes/_layout+/settings.team.users.invite-user.tsx +++ b/app/routes/_layout+/settings.team.users.invite-user.tsx @@ -18,6 +18,7 @@ import { import { UserIcon } from "~/components/icons/library"; import { Button } from "~/components/shared/button"; import { Image } from "~/components/shared/image"; +import { WarningBox } from "~/components/shared/warning-box"; import { db } from "~/database/db.server"; import { useSearchParams } from "~/hooks/search-params"; import { useCurrentOrganization } from "~/hooks/use-current-organization-id"; @@ -252,6 +253,15 @@ export default function InviteUser() { required /> + + <> + IMPORTANT: User invite emails contain a link with + a unique token that expires after being consumed. Please make sure + to add the shelf.nu domain to + your email whitelist to ensure the email is delivered and the link + is not consumed by your anti-spam software. + +