1
0

chore: rename getRedirectRoute

This commit is contained in:
kolaente 2023-04-01 14:12:47 +02:00
parent f68bb2625e
commit 59b05e9836
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ export function useRedirectToLastVisited() {
const router = useRouter() const router = useRouter()
function getRedirectRoute() { function getLastVisitedRoute() {
const last = getLastVisited() const last = getLastVisited()
if (last !== null) { if (last !== null) {
clearLastVisited() clearLastVisited()
@ -20,7 +20,7 @@ export function useRedirectToLastVisited() {
} }
function redirectIfSaved() { function redirectIfSaved() {
const lastRoute = getRedirectRoute() const lastRoute = getLastVisitedRoute()
if (lastRoute) { if (lastRoute) {
router.push(lastRoute) router.push(lastRoute)
} }
@ -30,6 +30,6 @@ export function useRedirectToLastVisited() {
return { return {
redirectIfSaved, redirectIfSaved,
getRedirectRoute, getLastVisitedRoute,
} }
} }

View File

@ -47,7 +47,7 @@ import {useRedirectToLastVisited} from '@/composables/useRedirectToLastVisited'
const {t} = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})
useTitle(t('sharing.authenticating')) useTitle(t('sharing.authenticating'))
const {getRedirectRoute} = useRedirectToLastVisited() const {getLastVisitedRoute} = useRedirectToLastVisited()
function useAuth() { function useAuth() {
const baseStore = useBaseStore() const baseStore = useBaseStore()
@ -92,7 +92,7 @@ function useAuth() {
const hash = linkShareHashPrefix + route.params.share const hash = linkShareHashPrefix + route.params.share
const last = getRedirectRoute() const last = getLastVisitedRoute()
if (last) { if (last) {
router.push({ router.push({
...last, ...last,