We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a40cc83 commit f2827d4Copy full SHA for f2827d4
webapp/src/router/index.js
@@ -102,7 +102,17 @@ const router = createRouter({
102
routes,
103
});
104
105
-router.beforeEach((to, from, next) => {
+router.beforeEach(async (to, from, next) => {
106
+ if (to.path === "/" || (to.name === "samples" && from.path === "/")) {
107
+ const { getUserInfo } = await import("@/server_fetch_utils.js");
108
+ const user = await getUserInfo();
109
+
110
+ if (!user) {
111
+ next("/about");
112
+ return;
113
+ }
114
115
116
const websiteTitle = process.env.VUE_APP_WEBSITE_TITLE || "datalab";
117
118
const capitalizeFirstLetter = (string) => {
0 commit comments