Refactor!: Codebase
This commit is contained in:
@@ -118,18 +118,18 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useAuthStore } from '@/plugins/store/authStore';
|
||||
import { auth } from '@/stores/auth.js';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const authStore = useAuthStore();
|
||||
const store = auth();
|
||||
const router = useRouter()
|
||||
|
||||
const logout = () => {
|
||||
authStore.logout();
|
||||
store.logout();
|
||||
router.push('/login');
|
||||
}
|
||||
|
||||
const user = authStore.user;
|
||||
const user = store.user;
|
||||
</script>
|
||||
|
||||
<style src="../cssstyle/index.css"></style>
|
||||
<style src="../cssstyle/index.css"></style>
|
||||
|
||||
Reference in New Issue
Block a user