fix redirection after error

This commit is contained in:
joshuaboud 2022-05-31 18:03:33 -03:00
parent 9ffa3673d1
commit 7bc24185eb
No known key found for this signature in database
GPG Key ID: 17EFB59E2A8BF50E

View File

@ -9,7 +9,6 @@
<script setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { lastPathStorageKey } from '../keys';
const props = defineProps({
message: {
@ -32,10 +31,8 @@ const countdown = () => {
counter.value--;
if (counter.value > 0)
setTimeout(countdown, 1000);
else {
const lastLocation = localStorage.getItem(lastPathStorageKey) ?? '/';
router.push(`/browse${lastLocation}`);
}
else
router.push(`/browse/${cockpit.transport.host}/`);
}
setTimeout(countdown, 1000);