@@ -87,25 +87,27 @@ const logout = () => {
8787 Create New Team
8888 </DropdownLink>
8989
90- <div class="border-t border-gray-200 dark:border-gray-600" />
91-
9290 <!-- Team Switcher -->
93- <div class="block px-4 py-2 text-xs text-gray-400">
94- Switch Teams
95- </div>
96-
97- <template v-for="team in $page.props.auth.user.all_teams" :key="team.id">
98- <form @submit.prevent="switchToTeam(team)">
99- <DropdownLink as="button">
100- <div class="flex items-center">
101- <svg v-if="team.id == $page.props.auth.user.current_team_id" class="mr-2 h-5 w-5 text-green-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
102- <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
103- </svg>
104-
105- <div>{{ team.name }}</div>
106- </div>
107- </DropdownLink>
108- </form>
91+ <template v-if="$page.props.auth.user.all_teams.length > 1">
92+ <div class="border-t border-gray-200 dark:border-gray-600" />
93+
94+ <div class="block px-4 py-2 text-xs text-gray-400">
95+ Switch Teams
96+ </div>
97+
98+ <template v-for="team in $page.props.auth.user.all_teams" :key="team.id">
99+ <form @submit.prevent="switchToTeam(team)">
100+ <DropdownLink as="button">
101+ <div class="flex items-center">
102+ <svg v-if="team.id == $page.props.auth.user.current_team_id" class="mr-2 h-5 w-5 text-green-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
103+ <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
104+ </svg>
105+
106+ <div>{{ team.name }}</div>
107+ </div>
108+ </DropdownLink>
109+ </form>
110+ </template>
109111 </template>
110112 </template>
111113 </div>
@@ -246,24 +248,26 @@ const logout = () => {
246248 Create New Team
247249 </ResponsiveNavLink>
248250
249- <div class="border-t border-gray-200 dark:border-gray-600" />
250-
251251 <!-- Team Switcher -->
252- <div class="block px-4 py-2 text-xs text-gray-400">
253- Switch Teams
254- </div>
255-
256- <template v-for="team in $page.props.auth.user.all_teams" :key="team.id">
257- <form @submit.prevent="switchToTeam(team)">
258- <ResponsiveNavLink as="button">
259- <div class="flex items-center">
260- <svg v-if="team.id == $page.props.auth.user.current_team_id" class="mr-2 h-5 w-5 text-green-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
261- <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
262- </svg>
263- <div>{{ team.name }}</div>
264- </div>
265- </ResponsiveNavLink>
266- </form>
252+ <template v-if="$page.props.auth.user.all_teams.length > 1">
253+ <div class="border-t border-gray-200 dark:border-gray-600" />
254+
255+ <div class="block px-4 py-2 text-xs text-gray-400">
256+ Switch Teams
257+ </div>
258+
259+ <template v-for="team in $page.props.auth.user.all_teams" :key="team.id">
260+ <form @submit.prevent="switchToTeam(team)">
261+ <ResponsiveNavLink as="button">
262+ <div class="flex items-center">
263+ <svg v-if="team.id == $page.props.auth.user.current_team_id" class="mr-2 h-5 w-5 text-green-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
264+ <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
265+ </svg>
266+ <div>{{ team.name }}</div>
267+ </div>
268+ </ResponsiveNavLink>
269+ </form>
270+ </template>
267271 </template>
268272 </template>
269273 </div>
0 commit comments