(fix) デフォルト表示時のヘッダにあるチャンネルボタンが反応しない現象の修正 (#12648)

* dividerの仕変に追従

* fix type
This commit is contained in:
おさむのひと 2023-12-14 07:18:29 +09:00 committed by GitHub
parent 37820ad572
commit eeed67ecac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -125,14 +125,14 @@ async function chooseChannel(ev: MouseEvent): Promise<void> {
const channels = await os.api('channels/my-favorites', {
limit: 100,
});
const items = [
const items: MenuItem[] = [
...channels.map(channel => ({
type: 'link' as const,
text: channel.name,
indicate: channel.hasUnreadNote,
to: `/channels/${channel.id}`,
})),
(channels.length === 0 ? undefined : null),
(channels.length === 0 ? undefined : { type: 'divider' }),
{
type: 'link' as const,
icon: 'ti ti-plus',