Improvements to teams for self hosters (#7753)
* Write slug when no team billing * Remove recommended actions for invites
This commit is contained in:
parent
e88716758e
commit
9568e16ef6
|
@ -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) =>
|
||||
|
|
|
@ -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} />}
|
||||
|
|
|
@ -125,6 +125,7 @@ export const viewerTeamsRouter = router({
|
|||
metadata: {
|
||||
requestedSlug: slug,
|
||||
},
|
||||
...(!IS_TEAM_BILLING_ENABLED && { slug }),
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user