mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
address comments;
This commit is contained in:
@@ -5,8 +5,18 @@ import type { PageLoad } from './$types';
|
||||
import { selectedTab } from './store';
|
||||
|
||||
export const load: PageLoad = async ({ params }) => {
|
||||
let subroute: string;
|
||||
const tab = get(selectedTab);
|
||||
const subroute = ['keys', 'dev-keys'].includes(tab) ? tab : 'platforms';
|
||||
|
||||
switch (tab) {
|
||||
case 'keys':
|
||||
case 'dev-keys':
|
||||
subroute = tab;
|
||||
break;
|
||||
default:
|
||||
subroute = 'platforms';
|
||||
break;
|
||||
}
|
||||
|
||||
redirect(302, `${base}/project-${params.region}-${params.project}/overview/${subroute}`);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user