import { storage } from '@inside-library/helpers/Storage'

export default {
  group: 'postLogin',
  fn: async ({ to, router, store }) => {
    if (
      to.name.includes('Dashboard-') &&
      !to.name.includes('Tools') &&
      storage.get('client') === 'undefined'
    ) {
      router.push({ name: `ToolsDashboard-${store.getters.getCurrentLang}` })
    }
  }
}
