Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

952 B
Raw Blame
import { Hash, Settings } from 'lucide-react';
import { lazy } from 'react';

import ChannelLayoutSkeleton from '@/components/Skeleton/Channel';
import { createSurfaceSkeleton } from '@/components/Skeleton/Surface';
import { routeMeta } from '@/spa/router/routeMeta';

// Route metas load with the router on first paint; keep the Channel store out of that graph.
const ChannelDynamicMeta = lazy(() => import('./ChannelDynamicMeta'));
const ChannelSettingsDynamicMeta = lazy(() =>
  import('./ChannelDynamicMeta').then((module) => ({
    default: module.ChannelSettingsDynamicMeta,
  })),
);

export const channelRouteMeta = routeMeta({
  DynamicMeta: ChannelDynamicMeta,
  icon: Hash,
  Skeleton: ChannelLayoutSkeleton,
  titleKey: 'channel:title',
});

export const channelSettingsRouteMeta = routeMeta({
  DynamicMeta: ChannelSettingsDynamicMeta,
  icon: Settings,
  Skeleton: createSurfaceSkeleton('form'),
  titleKey: 'channel:settings.title',
});