2023-12-01 18:57:14 +01:00
|
|
|
import { useAuthStore } from '../stores/auth';
|
2022-09-20 21:59:52 +02:00
|
|
|
|
|
|
|
|
export default (to, from, next) => {
|
2023-12-01 18:57:14 +01:00
|
|
|
const authStore = useAuthStore()
|
|
|
|
|
if (!authStore.user?.is_subscribed) {
|
2022-09-20 21:59:52 +02:00
|
|
|
next({ name: 'pricing' })
|
|
|
|
|
} else {
|
|
|
|
|
next()
|
|
|
|
|
}
|
|
|
|
|
}
|