Files
calendar/apps/web/modules/teams/teams-view.tsx
T
Benny JooandGitHub 7b5a2726ab fix: translations for insights, routing-forms, apps store, etc (#16933)
* remove outdated translations for insights

* use i18n strings for insights

* use i18n strings for routing forms

* use i18n strings for apps store

* fix more pages

* refactor

* fix
2024-10-04 09:45:51 -03:00

46 lines
1.3 KiB
TypeScript

"use client";
import { TeamsListing } from "@calcom/features/ee/teams/components";
import Shell from "@calcom/features/shell/Shell";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import type { inferSSRProps } from "@calcom/types/inferSSRProps";
import { Button } from "@calcom/ui";
import type { getServerSideProps } from "@lib/teams/getServerSideProps";
export type PageProps = inferSSRProps<typeof getServerSideProps>;
function Teams(props: PageProps) {
const { t } = useLocale();
const [user] = trpc.viewer.me.useSuspenseQuery();
return (
<Shell
withoutMain={false}
heading={t("teams")}
subtitle={t("create_manage_teams_collaborative")}
title={t("teams")}
description={t("create_manage_teams_collaborative")}
hideHeadingOnMobile
CTA={
(!user.organizationId || user.organization.isOrgAdmin) && (
<Button
data-testid="new-team-btn"
variant="fab"
StartIcon="plus"
type="button"
href={`${WEBAPP_URL}/settings/teams/new?returnTo=${WEBAPP_URL}/teams`}>
{t("new")}
</Button>
)
}>
<TeamsListing />
</Shell>
);
}
Teams.requiresLicense = false;
export default Teams;