website: Support new widget types for labelling (#966)

* website: Support new widget types for labelling

Adds proper support for yes/no spam style questions as well as a simple interface for flag style labels.

Also cleaned up the Task component to fix some rerender issues.

* website: Fix some UI text, adjust yes/no button alignment

* website: Remove left over console.log

Co-authored-by: notmd <33456881+notmd@users.noreply.github.com>

---------

Co-authored-by: notmd <33456881+notmd@users.noreply.github.com>
This commit is contained in:
Adrian Cowan
2023-01-28 17:07:43 +01:00
committed by GitHub
co-authored by notmd
parent 314c590dd2
commit ab4dce3f60
21 changed files with 504 additions and 353 deletions
@@ -36,7 +36,7 @@ export function MessageTableEntry({ message, enabled, highlight }: MessageTableE
const router = useRouter();
const [emojiState, setEmojis] = useState<MessageEmojis>({ emojis: {}, user_emojis: [] });
useEffect(() => {
setEmojis({ emojis: message.emojis, user_emojis: message.user_emojis });
setEmojis({ emojis: message.emojis || {}, user_emojis: message.user_emojis || [] });
}, [message.emojis, message.user_emojis]);
const goToMessage = useCallback(() => router.push(`/messages/${message.id}`), [router, message.id]);