Improvements to teams for self hosters (#7753)

* Write slug when no team billing

* Remove recommended actions for invites
This commit is contained in:
Joe Au-Yeung 2023-03-15 15:09:43 -04:00 committed by GitHub
parent e88716758e
commit 9568e16ef6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,8 @@
import { useState } from "react";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { RouterOutputs, trpc } from "@calcom/trpc/react";
import type { RouterOutputs } from "@calcom/trpc/react";
import { trpc } from "@calcom/trpc/react";
import { Card, showToast } from "@calcom/ui";
import { FiUserPlus, FiUsers, FiEdit } from "@calcom/ui/components/icon";
@ -9,6 +10,7 @@ import TeamListItem from "./TeamListItem";
interface Props {
teams: RouterOutputs["viewer"]["teams"]["list"];
pending?: boolean;
}
export default function TeamList(props: Props) {
@ -54,7 +56,7 @@ export default function TeamList(props: Props) {
))}
{/* only show recommended steps when there is only one team */}
{props.teams.length === 1 && (
{!props.pending && props.teams.length === 1 && (
<>
{props.teams.map(
(team, i) =>

View File

@ -90,7 +90,7 @@ export function TeamsListing() {
<Label className="dark:text-darkgray-900 pb-2 font-semibold text-gray-900">
{t("pending_invites")}
</Label>
<TeamList teams={invites} />
<TeamList teams={invites} pending />
</div>
)}
{teams.length > 0 && <TeamList teams={teams} />}

View File

@ -125,6 +125,7 @@ export const viewerTeamsRouter = router({
metadata: {
requestedSlug: slug,
},
...(!IS_TEAM_BILLING_ENABLED && { slug }),
},
});