fix: eslint
Some checks failed
Format / formatting (push) Failing after 7s
Build / build (push) Successful in 43s
CI / build (push) Failing after 11s

This commit is contained in:
2025-05-13 19:52:31 +02:00
parent 19fef63b0e
commit 95eb154556
3 changed files with 20 additions and 16 deletions

View File

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { onMounted, ref } from "vue";
import { onMounted } from "vue";
import { useRouter } from "vue-router";
import { jwtDecode } from "jwt-decode"; // i hope this doesn't break the code later
import { store } from "../main.ts";
@ -13,7 +13,7 @@ type TokenPayload = {
};
};
const customRequest = ref("");
//const customRequest = ref("");
onMounted(() => {
if (store.authenticated && store.user.token) {
@ -25,7 +25,7 @@ onMounted(() => {
router.push("/admin");
return;
}
if (roles.includes("MyINPulse-entrepreneur")) {
router.push("/canvas");
return;
@ -34,7 +34,10 @@ onMounted(() => {
checkPending(
(response) => {
const isValidated = response.data === true;
if (isValidated && roles.includes("MyINPulse-entrepreneur")) {
if (
isValidated &&
roles.includes("MyINPulse-entrepreneur")
) {
router.push("/canvas");
//router.push("/JorCproject");
} else {
@ -65,7 +68,7 @@ onMounted(() => {
<error-wrapper></error-wrapper>
<div class="auth-container">
<div class="auth-card">
<h1>Bienvenue</h1>
<h1>Bienvenue à MyINPulse</h1>
<div
class="status"
@ -83,11 +86,12 @@ onMounted(() => {
<div class="actions">
<button @click="store.login">Login</button>
<button @click="store.logout">Logout</button>
<button @click="store.signup">Signup-admin</button>
<!--<button @click="store.signup">Signup-admin</button>
<button @click="store.signup">Signup-Entrepreneur</button>
<button @click="store.refreshUserToken">Refresh Token</button>
<button @click="store.refreshUserToken">Refresh Token</button>-->
</div>
<!--
<div v-if="store.authenticated" class="token-section">
<p><strong>Access Token:</strong></p>
<pre>{{ store.user.token }}</pre>
@ -111,7 +115,7 @@ onMounted(() => {
/>
<button @click="callApi(customRequest)">Call</button>
</div>
</div>
</div>-->
</div>
</div>
</template>