Skip to content

Commit f3df447

Browse files
committed
Small code improvements
1 parent 2c2655e commit f3df447

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

lib/public/views/Error/ErrorModel.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ import { Observable } from '/js/src/index.js';
1818
*/
1919
export class ErrorModel extends Observable {
2020
/**
21-
* The Error object.
22-
* @typedef {(Object)} Error
21+
* The ApplicationError object.
22+
* @typedef {(object)} ApplicationError
2323
* @property {string} code - The error code
2424
* @property {string} codeDescription - The description of the error code
2525
* @property {string} message - The error message
2626
*/
2727

2828
/**
2929
* The constructor for the Error model object
30-
* @returns {Object} Constructs the Error model
30+
* @returns {object} Constructs the Error model
3131
*/
3232
constructor() {
3333
super();
@@ -40,7 +40,7 @@ export class ErrorModel extends Observable {
4040

4141
/**
4242
* Sets the error object for the model
43-
* @param {Error} error The error object
43+
* @param {ApplicationError} error The error object
4444
* @returns {void}
4545
*/
4646
setError(error) {
@@ -53,7 +53,7 @@ export class ErrorModel extends Observable {
5353

5454
/**
5555
* Returns the error object for the model
56-
* @returns {Error} The error object
56+
* @returns {ApplicationError} The error object
5757
*/
5858
getError() {
5959
return this.error;

lib/public/views/Error/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* or submit itself to any jurisdiction.
1212
*/
1313
import { frontLink } from '../../components/common/navigation/frontLink.js';
14-
import { h } from '/js/src/index.js';
14+
import { h, iconHome } from '/js/src/index.js';
1515

1616
/**
1717
* Error page component that dynamically displays error details based on the model
@@ -31,7 +31,10 @@ export const ErrorPage = (model) => {
3131
h('h3', `${code} - ${codeDescription}`),
3232
h('.f5', message),
3333
frontLink(
34-
h('nav-link', ['Go to Home Page']),
34+
h('div.flex-row.justify-center.items-center.g1', [
35+
iconHome(),
36+
'Go to Home Page',
37+
]),
3538
'home',
3639
),
3740
]),

0 commit comments

Comments
 (0)