From 72ea68145827c64f6204743005fa295c41d65213 Mon Sep 17 00:00:00 2001 From: Davide Iadeluca Date: Fri, 29 Nov 2024 18:51:33 +0100 Subject: [PATCH] chore --- js/src/forum/components/SolvedFilter.tsx | 6 ++---- js/src/forum/extenders/extendIndexPage.tsx | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/js/src/forum/components/SolvedFilter.tsx b/js/src/forum/components/SolvedFilter.tsx index 013f485..ec60528 100644 --- a/js/src/forum/components/SolvedFilter.tsx +++ b/js/src/forum/components/SolvedFilter.tsx @@ -3,13 +3,11 @@ import Component, { ComponentAttrs } from 'flarum/common/Component'; import Dropdown from 'flarum/common/components/Dropdown'; import Button from 'flarum/common/components/Button'; -export interface SolvedFilterAttrs extends ComponentAttrs { - selected: number; -} +export interface SolvedFilterAttrs extends ComponentAttrs {} export default class SolvedFilter extends Component { view() { - const { selected } = this.attrs; + const selected = app.discussions.bestAnswer as unknown as number; const options = ['all', 'solved', 'unsolved']; return Dropdown.component( diff --git a/js/src/forum/extenders/extendIndexPage.tsx b/js/src/forum/extenders/extendIndexPage.tsx index 93d87ce..aa12ca9 100644 --- a/js/src/forum/extenders/extendIndexPage.tsx +++ b/js/src/forum/extenders/extendIndexPage.tsx @@ -36,8 +36,6 @@ export default function extendIndexPage() { return; } - const selected = app.discussions.bestAnswer as unknown as number; - - items.add('solved-filter', ); + items.add('solved-filter', ); }); }