Add not-founde page

This commit is contained in:
Stanislav Romanov 2022-09-19 10:10:52 +03:00
parent 346117664d
commit c8c9c453fd
4 changed files with 22 additions and 0 deletions

View file

@ -32,4 +32,5 @@ Router.map(function () {
});
});
this.route('login');
this.route('not-found', { path: '/*path' });
});

3
app/routes/not-found.js Normal file
View file

@ -0,0 +1,3 @@
import Route from '@ember/routing/route';
export default class NotFoundRoute extends Route {}

View file

@ -0,0 +1,7 @@
<div class='flex flex-col justify-center min-h-screen'>
<div class='mx-auto text-center'>
<h1 class="text-8xl mb-4">404</h1>
<h2 class="text-4xl mb-4">Page not found</h2>
<LinkTo @route="application">Go back home</LinkTo>
</div>
</div>

View file

@ -0,0 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'meiliadmin/tests/helpers';
module('Unit | Route | not-found', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
let route = this.owner.lookup('route:not-found');
assert.ok(route);
});
});