mirror of
https://github.com/lumehq/lume.git
synced 2025-09-19 02:11:47 +02:00
temp fix channel list
This commit is contained in:
@@ -1,12 +1,20 @@
|
|||||||
import { ChannelListItem } from '@components/channels/channelListItem';
|
import { ChannelListItem } from '@components/channels/channelListItem';
|
||||||
import { CreateChannelModal } from '@components/channels/createChannelModal';
|
import { CreateChannelModal } from '@components/channels/createChannelModal';
|
||||||
|
|
||||||
import { channelsAtom } from '@stores/channel';
|
import { channelsAtom, defaultChannelsAtom } from '@stores/channel';
|
||||||
|
|
||||||
import { useAtomValue } from 'jotai';
|
import { useAtomValue } from 'jotai';
|
||||||
|
|
||||||
export default function ChannelList() {
|
export default function ChannelList() {
|
||||||
const list = useAtomValue(channelsAtom);
|
let atom;
|
||||||
|
|
||||||
|
if (typeof window !== 'undefined') {
|
||||||
|
atom = channelsAtom;
|
||||||
|
} else {
|
||||||
|
atom = defaultChannelsAtom;
|
||||||
|
}
|
||||||
|
|
||||||
|
const list: any = useAtomValue(atom);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-px">
|
<div className="flex flex-col gap-px">
|
||||||
|
@@ -1,13 +1,12 @@
|
|||||||
import ActiveLink from '@components/activeLink';
|
import ActiveLink from '@components/activeLink';
|
||||||
|
import ChannelList from '@components/channels/channelList';
|
||||||
import ChatList from '@components/chats/chatList';
|
import ChatList from '@components/chats/chatList';
|
||||||
|
|
||||||
import { Disclosure } from '@headlessui/react';
|
import { Disclosure } from '@headlessui/react';
|
||||||
import { Bonfire, NavArrowUp, PeopleTag } from 'iconoir-react';
|
import { Bonfire, NavArrowUp, PeopleTag } from 'iconoir-react';
|
||||||
import { Suspense, lazy } from 'react';
|
import { Suspense } from 'react';
|
||||||
import Skeleton from 'react-loading-skeleton';
|
import Skeleton from 'react-loading-skeleton';
|
||||||
|
|
||||||
const ChannelList = lazy(() => import('@components/channels/channelList'));
|
|
||||||
|
|
||||||
export default function Navigation() {
|
export default function Navigation() {
|
||||||
return (
|
return (
|
||||||
<div className="relative flex h-full flex-col gap-1 overflow-hidden pt-3">
|
<div className="relative flex h-full flex-col gap-1 overflow-hidden pt-3">
|
||||||
|
Reference in New Issue
Block a user