revert route groups due to nextjs bug, fix build

This commit is contained in:
Ren Amamiya
2023-04-18 07:55:11 +07:00
parent 2b0a4e2402
commit fc258fdcde
38 changed files with 89 additions and 92 deletions
+28
View File
@@ -0,0 +1,28 @@
'use client';
import { BrowseChannelItem } from '@components/channels/browseChannelItem';
import { useEffect, useState } from 'react';
export default function Page() {
const [list, setList] = useState([]);
useEffect(() => {
const fetchChannels = async () => {
const { getChannels } = await import('@utils/bindings');
return await getChannels({ limit: 100, offset: 0 });
};
fetchChannels()
.then((res) => setList(res))
.catch(console.error);
}, []);
return (
<div className="h-full w-full overflow-y-auto">
{list.map((channel) => (
<BrowseChannelItem key={channel.id} data={channel} />
))}
</div>
);
}