Ghost/ghost/admin/app/routes/home.js
Chris Raible 59076d1bca
Reverted "Fixed PostHog toolbar in admin (#19675)" (#19680)
This reverts commit c32ee3ca40.

- I found another way to fix this, making this change unnecessary
2024-02-08 16:58:46 -08:00

23 lines
547 B
JavaScript

import Route from '@ember/routing/route';
import {inject as service} from '@ember/service';
export default class HomeRoute extends Route {
@service feature;
@service modals;
@service router;
beforeModel(transition) {
super.beforeModel(...arguments);
if (transition.to?.queryParams?.firstStart === 'true') {
return this.router.transitionTo('setup.done');
}
this.router.transitionTo('dashboard');
}
resetController(controller) {
controller.firstStart = false;
}
}