change oauth link
This commit is contained in:
parent
59a33754e2
commit
0d29d59937
2 changed files with 8 additions and 4 deletions
|
@ -6,13 +6,14 @@ import File from "~/components/dashboard/File";
|
|||
import { SolarUploadLinear, SvgSpinnersBarsRotateFade } from "~/components/misc/Icons";
|
||||
import { useNanostore$ } from "~/hooks/nanostores";
|
||||
import { api } from "~/lib/api";
|
||||
import { OAUTH_LINK } from "~/lib/constants";
|
||||
import { areFilesLoaded, dashboardFiles } from "~/lib/stores";
|
||||
import { StereoFile } from "~/lib/types";
|
||||
|
||||
export const useAuthCheck = routeLoader$(({ cookie, redirect: r }) => {
|
||||
const jwt = cookie.get("jwt");
|
||||
if (jwt) return {};
|
||||
throw r(302, "/");
|
||||
throw r(302, OAUTH_LINK);
|
||||
});
|
||||
|
||||
export default component$(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue