From 09529712ddf3e46db3dfa1f987be3100fa2bbed0 Mon Sep 17 00:00:00 2001 From: ksvijayan06 Date: Tue, 1 Oct 2024 21:12:50 +0530 Subject: [PATCH 1/3] HeaderPrimary.js converted to HeaderPrimary.tsx --- .../components/{HeaderPrimary.js => HeaderPrimary.tsx} | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename framework/core/js/src/forum/components/{HeaderPrimary.js => HeaderPrimary.tsx} (81%) diff --git a/framework/core/js/src/forum/components/HeaderPrimary.js b/framework/core/js/src/forum/components/HeaderPrimary.tsx similarity index 81% rename from framework/core/js/src/forum/components/HeaderPrimary.js rename to framework/core/js/src/forum/components/HeaderPrimary.tsx index 55282fd22c..5d604fe3cc 100644 --- a/framework/core/js/src/forum/components/HeaderPrimary.js +++ b/framework/core/js/src/forum/components/HeaderPrimary.tsx @@ -7,7 +7,7 @@ import listItems from '../../common/helpers/listItems'; * default skin, these are shown just to the right of the forum title. */ export default class HeaderPrimary extends Component { - view() { + view(): JSX.Element { return ; } @@ -16,7 +16,8 @@ export default class HeaderPrimary extends Component { * * @return {ItemList} */ - items() { - return new ItemList(); + + items(): ItemList { + return new ItemList(); } } From eb6ea8b4f602b48c67a8cc9fee0e06c02a8d1af8 Mon Sep 17 00:00:00 2001 From: ksvijayan06 Date: Wed, 2 Oct 2024 07:54:53 +0530 Subject: [PATCH 2/3] import Mithril at the top --- framework/core/js/src/forum/components/HeaderPrimary.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/framework/core/js/src/forum/components/HeaderPrimary.tsx b/framework/core/js/src/forum/components/HeaderPrimary.tsx index 5d604fe3cc..c1cbc8ba21 100644 --- a/framework/core/js/src/forum/components/HeaderPrimary.tsx +++ b/framework/core/js/src/forum/components/HeaderPrimary.tsx @@ -1,6 +1,7 @@ import Component from '../../common/Component'; import ItemList from '../../common/utils/ItemList'; import listItems from '../../common/helpers/listItems'; +import type Mithril from 'mithril'; /** * The `HeaderPrimary` component displays primary header controls. On the @@ -17,7 +18,7 @@ export default class HeaderPrimary extends Component { * @return {ItemList} */ - items(): ItemList { - return new ItemList(); + items(): ItemList { + return new ItemList(); } } From 4e255ec41c3f8574d7d6b6d5d2b3209423dc214f Mon Sep 17 00:00:00 2001 From: Sami Mazouz Date: Wed, 2 Oct 2024 21:21:50 +0100 Subject: [PATCH 3/3] chore: format --- framework/core/js/src/forum/components/HeaderPrimary.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/js/src/forum/components/HeaderPrimary.tsx b/framework/core/js/src/forum/components/HeaderPrimary.tsx index c1cbc8ba21..328377e273 100644 --- a/framework/core/js/src/forum/components/HeaderPrimary.tsx +++ b/framework/core/js/src/forum/components/HeaderPrimary.tsx @@ -17,7 +17,7 @@ export default class HeaderPrimary extends Component { * * @return {ItemList} */ - + items(): ItemList { return new ItemList(); }