Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
feat: redirect to add members
Marc Seitzc16c19afee45
diff --git a/components/teams/select-team.tsx b/components/teams/select-team.tsxindex d63c66f0..cf93aef6 100644--- a/components/teams/select-team.tsx+++ b/components/teams/select-team.tsx@@ -5,6 +5,9 @@ import { AddTeamModal } from "./add-team-modal";import { ChevronUpDownIcon } from "@heroicons/react/20/solid";import { Team } from "@/lib/types";import { useRouter } from "next/router";+import { AddTeamMembers } from "./add-team-member-modal";+import { Button } from "../ui/button";+import Link from "next/link";const SelectTeam = ({ teams, currentTeam, isLoading }: TeamContextType) => {const [selectTeamOpen, setSelectTeamOpen] = useState<boolean>(false);@@ -41,35 +44,36 @@ const SelectTeam = ({ teams, currentTeam, isLoading }: TeamContextType) => {</h2>) : (<>- <h4 className="text-sm font-semibold my-2 mx-3">Your teams</h4>+ <h4 className="text-sm font-semibold my-2 mx-3">Your team</h4><divclassName="relative h-10 mb-6 w-full rounded-md border border-input bg-background text-sm ring-offset-background select-none"- ref={ref}>+ ref={ref}+ ><divclassName="flex items-center justify-between cursor-pointer px-3 py-2"- onClick={() => setSelectTeamOpen(!selectTeamOpen)}>+ onClick={() => setSelectTeamOpen(!selectTeamOpen)}+ >{currentTeam?.name}<ChevronUpDownIcon className="h-4 w-4" /></div>{selectTeamOpen && (<div className="z-50 bg-popover text-popover-foreground shadow-md absolute top-12 left-0 max-h-72 w-full space-y-0.5 border overflow-auto rounded-md text-base sm:w-60 sm:text-sm sm:shadow-lg">- <div className="py-2 px-4 text-sm text-gray-400">- Custom Teams- </div>{teams.map((team) => (<divkey={team.id}className={`relative flex w-full items-center space-x-2 rounded-md px-4 py-2 hover:bg-gray-200 hover:dark:bg-gray-800 duration-100 cursor-pointer ${team.id === currentTeam?.id ? "font-medium" : ""} transition-all duration-75`}- onClick={() => switchTeam(team)}>+ onClick={() => switchTeam(team)}+ ><spanclassName={`block truncate text-sm ${team.id === currentTeam?.id? "font-medium": "font-normal"- }`}>+ }`}+ >{team.name}</span>{team.id === currentTeam?.id ? (@@ -82,12 +86,13 @@ const SelectTeam = ({ teams, currentTeam, isLoading }: TeamContextType) => {) : null}</div>))}- <AddTeamModal>- <div className="flex mt-1 gap-2 items-center border-t p-3 text-sm hover:bg-gray-200 hover:dark:bg-gray-800 duration-100 hover:cursor-pointer">- <PlusIcon className="h-5 w-5" />- Create Team- </div>- </AddTeamModal>+ <Link+ href="/settings/people"+ className="flex mt-1 gap-2 items-center border-t p-3 text-sm hover:bg-gray-200 hover:dark:bg-gray-800 duration-100 hover:cursor-pointer"+ >+ <PlusIcon className="h-5 w-5" />+ Invite Members+ </Link></div>)}</div>