Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideIadeluca committed Nov 29, 2024
1 parent 03e2950 commit 72ea681
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions js/src/forum/components/SolvedFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<SolvedFilterAttrs> {
view() {
const { selected } = this.attrs;
const selected = app.discussions.bestAnswer as unknown as number;
const options = ['all', 'solved', 'unsolved'];

return Dropdown.component(
Expand Down
4 changes: 1 addition & 3 deletions js/src/forum/extenders/extendIndexPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export default function extendIndexPage() {
return;
}

const selected = app.discussions.bestAnswer as unknown as number;

items.add('solved-filter', <SolvedFilter selected={selected} />);
items.add('solved-filter', <SolvedFilter />);
});
}

0 comments on commit 72ea681

Please sign in to comment.