forked from lapikud/lapikud.github.io
feat: Migrate more to VueV3 logic, navbar improvements
This commit is contained in:
12
src/App.vue
12
src/App.vue
@@ -1,8 +1,20 @@
|
||||
<script setup>
|
||||
import { onMounted } from 'vue';
|
||||
import { Router, text } from "./lib/index.js";
|
||||
import { routes } from "./routes/index.js";
|
||||
import Navbar from "./layout/Navbar.vue";
|
||||
import Footer from "./layout/Footer.vue";
|
||||
|
||||
// Handle redirect from 404 page (replaces inline script in index.html)
|
||||
onMounted(() => {
|
||||
if (typeof window !== 'undefined') {
|
||||
const redirect = sessionStorage.redirect;
|
||||
if (redirect && redirect !== window.location.href) {
|
||||
window.history.replaceState(null, null, redirect);
|
||||
}
|
||||
delete sessionStorage.redirect;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user