Skip to content

Commit

Permalink
chore(frontend): add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
JoltCode committed Dec 18, 2024
1 parent 8071b53 commit 8abd578
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions frontend/src/components/banner/topBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ export function TopBanner() {
const [dangerousInner, setDangerousInner] = useState<null | string | TrustedHTML>(null);

useEffect(() => {
(async () => {
// TODO: Spotted this - is this meant to be ran? The IIFE is never called at the end.
async () => {
// @ts-expect-error
setDangerousInner((await htmlFromMarkdown(data?.message)).__html)
})
}, [data])
setDangerousInner((await htmlFromMarkdown(data?.message)).__html);
};
}, [data]);

return (
<>
Expand All @@ -24,7 +25,7 @@ export function TopBanner() {
<div
className="fw6 flex justify-center"
dangerouslySetInnerHTML={{
__html: dangerousInner ?? ""
__html: dangerousInner ?? '',
}}
/>
</div>
Expand Down

0 comments on commit 8abd578

Please sign in to comment.