We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
script
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From #621 (comment)
This file breaks with Unexpected token (1:3) I think caused by the comments <!-- <script su-router:imports:sync> -->
<!-- <script su-router:imports:sync> -->
<!-- <script su-router:imports:sync> --> <script> import { onMount } from "svelte"; import { link, useRouter, useGuard, exists } from "@svelteuse/router"; import { msalInstance } from "../logic/auth.js"; // "google", // "google-cn", // "deepl", // "libretranslate" let accounts = msalInstance.getAllAccounts(); console.log("acc", accounts); const guardCheck = useGuard( { link: "or", redirect: "/login" }, exists(accounts[0]) ); if (!guardCheck) { $useRouter.navigate("/login"); window.location.reload(); } console.log("isAllowed", guardCheck); onMount(() => { console.log("onMount Default LAYOUT"); async function init() { console.log("init"); // // await msalInstance.handleRedirectPromise(); // let accounts = msalInstance.getAllAccounts(); // console.log("acc", accounts); // const guardCheck = useGuard({ link: "or" }, exists(accounts[0])); // if (!guardCheck) { // $useRouter.navigate("/login"); // window.location.reload(); // } // console.log("isAllowed", guardCheck); } init(); }); // async function handle365Login(event) { // console.log("LOGIN EVENT"); // msalInstance // .loginRedirect() // .then((res) => { // console.log(res); // }) // .catch((e) => { // console.error(e); // }); // } async function handle365Logout() { console.log("LOGOUT EVENT"); await msalInstance.logoutRedirect(); window.location.reload(); } </script> <div class="min-h-100vh flex flex-col"> <header class="flex flex-row place-content-center p-4"> <div class="flex flex-row gap-2"> <a href="/farmer1" use:link><f-button>Fendt Farmer 1</f-button></a> <a href="/news" use:link><f-button>Neuigkeiten</f-button></a> <!-- <f-button on:click={(e) => handle365Login(e)}>LOGIN</f-button> --> <f-button on:click={(e) => handle365Logout(e)}>Ausloggen</f-button> </div> </header> <main class="flex-grow grid place-content-center"> <slot /> </main> <footer class="flex flex-row place-content-center p-6"> <div class="flex flex-col items-center gap-2"> <span> REPGUIDE © 2021 </span> <div class="flex flex-row gap-2"> <a href="/">Impressum</a><a href="/">DATENSCHUTZ</a><a href="/">AGB</a> </div> </div> </footer> </div>
The text was updated successfully, but these errors were encountered:
67dc0b0
No branches or pull requests
From #621 (comment)
This file breaks with Unexpected token (1:3)
I think caused by the comments
<!-- <script su-router:imports:sync> -->
The text was updated successfully, but these errors were encountered: