Skip to content

Commit 0fad6ff

Browse files
committed
chore: fix UI npm run export error
1 parent 9369106 commit 0fad6ff

File tree

4 files changed

+57
-621
lines changed

4 files changed

+57
-621
lines changed

frontend/middleware.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,10 @@ export function middleware(request: NextRequest) {
1414
return NextResponse.next();
1515
}
1616

17-
if (pathname === '/') {
17+
if (pathname === '/' || pathname === '/mint-authority') {
1818
return NextResponse.redirect(new URL('/connected-wallet', request.url));
1919
}
2020

21-
if (pathname === '/mint-authority') {
22-
return NextResponse.next();
23-
}
24-
2521
const segments = pathname.split('/').filter(Boolean);
2622
if (segments.length > 0 && allowedUserRoutes.has(segments[0])) {
2723
return NextResponse.next();

frontend/src/app/components/ProfileSwitcher.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ export default function ProfileSwitcher() {
3232
const demoContext = React.useContext(DemoEnvironmentContext);
3333

3434
const getRouteForUser = React.useCallback((user: UserName) => {
35-
if (user === 'Mint Authority') {
36-
return '/mint-authority';
37-
}
3835
if (user === 'Not Connected') {
3936
return '/connected-wallet';
4037
}
38+
if (user === 'Mint Authority') {
39+
return '/connected-wallet';
40+
}
4141
return `/${user.toLowerCase().replace(/\s+/g, '-')}`;
4242
}, []);
4343

0 commit comments

Comments
 (0)