2022-12-07 20:53:44 +00:00
|
|
|
import { GetServerSidePropsContext } from "next";
|
|
|
|
|
2022-11-10 20:23:56 +00:00
|
|
|
import { TeamsListing } from "@calcom/features/ee/teams/components";
|
|
|
|
import { WEBAPP_URL } from "@calcom/lib/constants";
|
2022-09-17 17:53:31 +00:00
|
|
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
2022-11-23 02:55:25 +00:00
|
|
|
import { Button, Icon, Shell } from "@calcom/ui";
|
2022-09-17 17:53:31 +00:00
|
|
|
|
2022-12-07 20:53:44 +00:00
|
|
|
import { ssrInit } from "@server/lib/ssr";
|
|
|
|
|
2022-09-17 17:53:31 +00:00
|
|
|
function Teams() {
|
|
|
|
const { t } = useLocale();
|
|
|
|
return (
|
|
|
|
<Shell
|
|
|
|
heading={t("teams")}
|
|
|
|
subtitle={t("create_manage_teams_collaborative")}
|
|
|
|
CTA={
|
2023-01-02 08:28:12 +00:00
|
|
|
<Button
|
|
|
|
size="fab"
|
|
|
|
StartIcon={Icon.FiPlus}
|
|
|
|
type="button"
|
|
|
|
href={`${WEBAPP_URL}/settings/teams/new?returnTo=/teams`}>
|
2022-09-17 17:53:31 +00:00
|
|
|
{t("new")}
|
|
|
|
</Button>
|
|
|
|
}>
|
2022-11-10 20:23:56 +00:00
|
|
|
<TeamsListing />
|
2022-09-17 17:53:31 +00:00
|
|
|
</Shell>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Teams.requiresLicense = false;
|
|
|
|
|
2022-12-07 20:53:44 +00:00
|
|
|
export const getServerSideProps = async (context: GetServerSidePropsContext) => {
|
|
|
|
const ssr = await ssrInit(context);
|
|
|
|
|
|
|
|
return {
|
|
|
|
props: {
|
|
|
|
trpcState: ssr.dehydrate(),
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-09-17 17:53:31 +00:00
|
|
|
export default Teams;
|