File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ export async function getDefaultTeam() {
8484 return null ;
8585}
8686
87- export async function getLastVisitedTeamOrDefaultTeam ( ) {
87+ export async function getLastVisitedTeam ( ) {
8888 const token = await getAuthToken ( ) ;
8989 if ( ! token ) {
9090 return null ;
@@ -100,5 +100,5 @@ export async function getLastVisitedTeamOrDefaultTeam() {
100100 }
101101 }
102102
103- return getDefaultTeam ( ) ;
103+ return null ;
104104}
Original file line number Diff line number Diff line change 1- import { getLastVisitedTeamOrDefaultTeam } from "@/api/team" ;
2- import { notFound , redirect } from "next/navigation" ;
1+ import { getLastVisitedTeam } from "@/api/team" ;
2+ import { redirect } from "next/navigation" ;
33
44export default async function TeamRootPage ( ) {
5- const team = await getLastVisitedTeamOrDefaultTeam ( ) ;
6- if ( ! team ) {
7- notFound ( ) ;
8- }
9- redirect ( `/team/${ team . slug } ` ) ;
5+ const team = await getLastVisitedTeam ( ) ;
6+ redirect ( team ? `/team/${ team . slug } ` : "/team/~" ) ;
107}
You can’t perform that action at this time.
0 commit comments