mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-02 20:58:12 +00:00
v4.6 -1 (#459)
This commit is contained in:
@@ -4,12 +4,19 @@ import { useRouter } from 'next/router';
|
||||
import { useLoading } from '@/web/common/hooks/useLoading';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import { throttle } from 'lodash';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { getUnreadCount } from '@/web/support/user/inform/api';
|
||||
import { feConfigs } from '@/web/common/system/staticData';
|
||||
import dynamic from 'next/dynamic';
|
||||
|
||||
import Auth from './auth';
|
||||
import Navbar from './navbar';
|
||||
import NavbarPhone from './navbarPhone';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { getUnreadCount } from '@/web/support/user/api';
|
||||
const UpdateInviteModal = dynamic(
|
||||
() => import('@/components/support/user/team/UpdateInviteModal'),
|
||||
{ ssr: false }
|
||||
);
|
||||
|
||||
const pcUnShowLayoutRoute: Record<string, boolean> = {
|
||||
'/': true,
|
||||
@@ -60,7 +67,7 @@ const Layout = ({ children }: { children: JSX.Element }) => {
|
||||
}, [loadGitStar, setScreenWidth]);
|
||||
|
||||
const { data: unread = 0 } = useQuery(['getUnreadCount'], getUnreadCount, {
|
||||
enabled: !!userInfo,
|
||||
enabled: !!userInfo && feConfigs.isPlus,
|
||||
refetchInterval: 10000
|
||||
});
|
||||
|
||||
@@ -103,6 +110,7 @@ const Layout = ({ children }: { children: JSX.Element }) => {
|
||||
)}
|
||||
</Box>
|
||||
<Loading loading={loading} zIndex={9999} />
|
||||
{!!userInfo && <UpdateInviteModal />}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
@@ -3,7 +3,7 @@ import { Box, Flex, Link } from '@chakra-ui/react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import { useChatStore } from '@/web/core/chat/storeChat';
|
||||
import { HUMAN_ICON } from '@/constants/chat';
|
||||
import { HUMAN_ICON } from '@fastgpt/global/core/chat/constants';
|
||||
import { feConfigs } from '@/web/common/system/staticData';
|
||||
import NextLink from 'next/link';
|
||||
import Badge from '../Badge';
|
||||
|
Reference in New Issue
Block a user