bugfix
This commit is contained in:
@@ -4,6 +4,7 @@ import axios from "axios";
|
||||
import { useAuthStore } from "@/stores/auth";
|
||||
|
||||
const auth = useAuthStore();
|
||||
const loggedIn = auth.loggedIn;
|
||||
const title = ref("");
|
||||
const content = ref("");
|
||||
|
||||
@@ -23,7 +24,7 @@ async function post() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="auth.loggedIn">
|
||||
<div v-if="loggedIn">
|
||||
<h1>Create Post</h1>
|
||||
<input type="text" v-model="title" placeholder="Title" />
|
||||
<textarea v-model="content" placeholder="Content"></textarea>
|
||||
|
||||
@@ -3,6 +3,7 @@ import { ref, onMounted, computed } from "vue";
|
||||
import { useAuthStore } from "@/stores/auth";
|
||||
|
||||
const auth = useAuthStore();
|
||||
const loggedIn = auth.loggedIn;
|
||||
const username = ref("");
|
||||
const password = ref("");
|
||||
|
||||
@@ -12,7 +13,7 @@ function handleLogin() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="auth.loggedIn">
|
||||
<div v-if="loggedIn">
|
||||
<h1>Logged in</h1>
|
||||
<p>{{ auth.user.ID }}</p>
|
||||
<p>{{ auth.user.username }}</p>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { useAuthStore } from "@/stores/auth";
|
||||
const auth = useAuthStore();
|
||||
const username = ref("");
|
||||
const password = ref("");
|
||||
const loggedIn = auth.loggedIn;
|
||||
|
||||
function handleLogin() {
|
||||
auth.logIn(username.value, password.value);
|
||||
@@ -16,7 +17,7 @@ function handleLogout() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="auth.loggedIn">
|
||||
<div v-if="loggedIn">
|
||||
<h1>Logged in</h1>
|
||||
<p>{{ auth.user.ID }}</p>
|
||||
<p>{{ auth.user.username }}</p>
|
||||
|
||||
Reference in New Issue
Block a user