File tree 2 files changed +6
-9
lines changed
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() {
84
84
return null ;
85
85
}
86
86
87
- export async function getLastVisitedTeamOrDefaultTeam ( ) {
87
+ export async function getLastVisitedTeam ( ) {
88
88
const token = await getAuthToken ( ) ;
89
89
if ( ! token ) {
90
90
return null ;
@@ -100,5 +100,5 @@ export async function getLastVisitedTeamOrDefaultTeam() {
100
100
}
101
101
}
102
102
103
- return getDefaultTeam ( ) ;
103
+ return null ;
104
104
}
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" ;
3
3
4
4
export 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/~" ) ;
10
7
}
You can’t perform that action at this time.
0 commit comments