opnform/resources/js/middleware/subscribed.js

11 lines
218 B
JavaScript
Raw Normal View History

import { useAuthStore } from '../stores/auth';
2022-09-20 19:59:52 +00:00
export default (to, from, next) => {
const authStore = useAuthStore()
if (!authStore.user?.is_subscribed) {
2022-09-20 19:59:52 +00:00
next({ name: 'pricing' })
} else {
next()
}
}