From 60632230526ea248a17d006082ad6145b3a4aa62 Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Mon, 29 Jan 2024 15:52:40 +0100 Subject: [PATCH] refactor: break down logic --- js/src/forum/components/Poll/PollOption.tsx | 10 ++----- .../forum/components/Poll/PollOptionInput.tsx | 26 +++++++++++++++++++ js/src/forum/components/Poll/PollResult.tsx | 16 ++++-------- .../components/Poll/PollResultNumber.tsx | 12 +++++++++ resources/less/forum.less | 3 +++ 5 files changed, 48 insertions(+), 19 deletions(-) create mode 100644 js/src/forum/components/Poll/PollOptionInput.tsx create mode 100644 js/src/forum/components/Poll/PollResultNumber.tsx diff --git a/js/src/forum/components/Poll/PollOption.tsx b/js/src/forum/components/Poll/PollOption.tsx index b3b4a118..5b69223c 100644 --- a/js/src/forum/components/Poll/PollOption.tsx +++ b/js/src/forum/components/Poll/PollOption.tsx @@ -2,19 +2,13 @@ import * as Mithril from 'mithril'; import Component from 'flarum/common/Component'; import PollOptionLabel from './PollOptionLabel'; import PollOptionDescription from './PollOptionDescription'; +import PollOptionInput from './PollOptionInput'; export default class PollOption extends Component { view(): Mithril.Children { return (