Add not-founde page
This commit is contained in:
parent
346117664d
commit
c8c9c453fd
4 changed files with 22 additions and 0 deletions
|
|
@ -32,4 +32,5 @@ Router.map(function () {
|
|||
});
|
||||
});
|
||||
this.route('login');
|
||||
this.route('not-found', { path: '/*path' });
|
||||
});
|
||||
|
|
|
|||
3
app/routes/not-found.js
Normal file
3
app/routes/not-found.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class NotFoundRoute extends Route {}
|
||||
7
app/templates/not-found.hbs
Normal file
7
app/templates/not-found.hbs
Normal 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>
|
||||
11
tests/unit/routes/not-found-test.js
Normal file
11
tests/unit/routes/not-found-test.js
Normal 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);
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue