mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-28 14:20:46 -05:00
Don't show create team button if not logged in
This commit is contained in:
@@ -98,7 +98,7 @@ const getTeamXPInfo = (roster: NonNullable<GetTeamData>["roster"]) => {
|
||||
};
|
||||
|
||||
const TeamPage: React.FC<Props> = (props) => {
|
||||
const { secondaryBgColor, themeColorHex } = useMyTheme();
|
||||
const { secondaryBgColor } = useMyTheme();
|
||||
const { data } = useSWR<GetTeamData>(`/api/teams/${props.team!.id}`, {
|
||||
initialData: props.team!,
|
||||
});
|
||||
|
||||
@@ -45,7 +45,7 @@ const TeamsPage = ({ teams }: Props) => {
|
||||
return (
|
||||
<>
|
||||
<MyHead title={t`Teams`} />
|
||||
{!isInTeam && <CreateNewTeamModal />}
|
||||
{!isInTeam && user && <CreateNewTeamModal />}
|
||||
{teams.length > 0 && (
|
||||
<Box mb={8}>
|
||||
<FormControl display="flex" alignItems="center">
|
||||
@@ -137,8 +137,8 @@ const TeamsPage = ({ teams }: Props) => {
|
||||
|
||||
<Flex ml={2}>
|
||||
{team.countries.map((country) => (
|
||||
<Box mr={1}>
|
||||
<Flag key={country} countryCode={country} />
|
||||
<Box key={country} mr={1}>
|
||||
<Flag countryCode={country} />
|
||||
</Box>
|
||||
))}
|
||||
</Flex>
|
||||
|
||||
Reference in New Issue
Block a user