use top level await for some functions

This commit is contained in:
Ren Amamiya
2023-04-23 12:15:04 +07:00
parent ac6fb3cb55
commit 97c45a8c8f
11 changed files with 270 additions and 271 deletions

View File

@@ -3,14 +3,11 @@ import { ChannelListItem } from '@components/channels/channelListItem';
import { DEFAULT_CHANNELS } from '@stores/constants';
import { Plus } from 'iconoir-react';
import { useState } from 'react';
export default function ChannelList() {
const [list] = useState(DEFAULT_CHANNELS);
return (
<div className="flex flex-col gap-px">
{list.map((item) => (
{DEFAULT_CHANNELS.map((item) => (
<ChannelListItem key={item.event_id} data={item} />
))}
<a