diff --git a/tunduk/components/Invites/Invites.tsx b/tunduk/components/Invites/Invites.tsx index 0f4a692..73587e3 100644 --- a/tunduk/components/Invites/Invites.tsx +++ b/tunduk/components/Invites/Invites.tsx @@ -1,5 +1,6 @@ import { Box, + Icon, Modal, ModalBody, ModalCloseButton, @@ -21,10 +22,8 @@ import { InvitesIcon } from '../Icons/Navbar'; import { GradientButtonText, LinkLabel } from '../Text'; interface Props { - userInvites: InviteDataType[] | undefined; - setUserInvites: React.Dispatch< - React.SetStateAction - >; + userInvites: InviteDataType[]; + setUserInvites: React.Dispatch>; currentUsername: StringOrUndefined; } @@ -132,7 +131,24 @@ const Invites: React.FC = ({ return ( <> - + + + {userInvites.length >= 1 && ( + + + + )} + diff --git a/tunduk/components/LoggedIn/LoggedIn.tsx b/tunduk/components/LoggedIn/LoggedIn.tsx index 02dc590..34d92b8 100644 --- a/tunduk/components/LoggedIn/LoggedIn.tsx +++ b/tunduk/components/LoggedIn/LoggedIn.tsx @@ -25,9 +25,7 @@ import { ProfileLink } from '../Links'; import Skeleton from '../Skeleton'; const LoggedIn: React.FC = () => { - const [userInvites, setUserInvites] = useState< - InviteDataType[] | undefined - >(); + const [userInvites, setUserInvites] = useState([]); const [username, setUsername] = useState(); const [avatar_url, setAvatarUrl] = useState(); const [groups, setGroups] = useState(); diff --git a/tunduk/pages/Profile/Profile.tsx b/tunduk/pages/Profile/Profile.tsx index 7b32fea..72ab71e 100644 --- a/tunduk/pages/Profile/Profile.tsx +++ b/tunduk/pages/Profile/Profile.tsx @@ -39,7 +39,7 @@ const Profile: React.FC = () => { const [old_username, setOldUsername] = useState(); const [password, setPassword] = useState(); const [avatar_url, setAvatarUrl] = useState(); - const [userInvites, setUserInvites] = useState(); + const [userInvites, setUserInvites] = useState([]); const [show, setShow] = useState(false); const [isLoading, setIsLoading] = useState(false); const [isUserdataLoading, setIsUserdataLoading] = @@ -260,14 +260,6 @@ const Profile: React.FC = () => { maxLength={20} placeholder="Username" /> - {user?.app_metadata.provider === 'email' ? (