feat: 将 AppFooter 集成到 MainLayout
This commit is contained in:
@@ -5,6 +5,7 @@ import { Outlet } from "react-router-dom";
|
|||||||
import { Box } from '@chakra-ui/react';
|
import { Box } from '@chakra-ui/react';
|
||||||
import HomeNavbar from "../components/Navbars/HomeNavbar";
|
import HomeNavbar from "../components/Navbars/HomeNavbar";
|
||||||
import PageLoader from "../components/Loading/PageLoader";
|
import PageLoader from "../components/Loading/PageLoader";
|
||||||
|
import AppFooter from "./AppFooter";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MainLayout - 带导航栏的主布局
|
* MainLayout - 带导航栏的主布局
|
||||||
@@ -15,17 +16,20 @@ import PageLoader from "../components/Loading/PageLoader";
|
|||||||
*/
|
*/
|
||||||
export default function MainLayout() {
|
export default function MainLayout() {
|
||||||
return (
|
return (
|
||||||
<Box minH="100vh">
|
<Box minH="100vh" display="flex" flexDirection="column">
|
||||||
{/* 导航栏 - 在所有页面间共享,不会重新渲染 */}
|
{/* 导航栏 - 在所有页面间共享,不会重新渲染 */}
|
||||||
<HomeNavbar />
|
<HomeNavbar />
|
||||||
|
|
||||||
{/* 页面内容区域 - 通过 Outlet 渲染当前路由对应的组件 */}
|
{/* 页面内容区域 - 通过 Outlet 渲染当前路由对应的组件 */}
|
||||||
{/* Suspense 只包裹内容区域,导航栏保持可见 */}
|
{/* Suspense 只包裹内容区域,导航栏保持可见 */}
|
||||||
<Box>
|
<Box flex="1">
|
||||||
<Suspense fallback={<PageLoader message="页面加载中..." />}>
|
<Suspense fallback={<PageLoader message="页面加载中..." />}>
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
{/* 页脚 - 在所有页面间共享 */}
|
||||||
|
<AppFooter />
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ import {
|
|||||||
Center,
|
Center,
|
||||||
useToast,
|
useToast,
|
||||||
Skeleton,
|
Skeleton,
|
||||||
Link,
|
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { FiLock } from 'react-icons/fi';
|
import { FiLock } from 'react-icons/fi';
|
||||||
import {
|
import {
|
||||||
@@ -823,26 +822,6 @@ const EventDetail = () => {
|
|||||||
</VStack>
|
</VStack>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
||||||
{/* Footer区域 */}
|
|
||||||
<Box bg={useColorModeValue('gray.100', 'gray.800')} py={6} mt={8}>
|
|
||||||
<Container maxW="7xl">
|
|
||||||
<VStack spacing={2}>
|
|
||||||
<Text color="gray.500" fontSize="sm">
|
|
||||||
© 2024 价值前沿. 保留所有权利.
|
|
||||||
</Text>
|
|
||||||
<HStack spacing={4} fontSize="xs" color="gray.400">
|
|
||||||
<Link
|
|
||||||
href="https://beian.mps.gov.cn/#/query/webSearch?code=11010802046286"
|
|
||||||
isExternal
|
|
||||||
_hover={{ color: 'gray.600' }}
|
|
||||||
>
|
|
||||||
京公网安备11010802046286号
|
|
||||||
</Link>
|
|
||||||
<Text>京ICP备2025107343号-1</Text>
|
|
||||||
</HStack>
|
|
||||||
</VStack>
|
|
||||||
</Container>
|
|
||||||
</Box>
|
|
||||||
{/* 升级弹窗 */}
|
{/* 升级弹窗 */}
|
||||||
<SubscriptionUpgradeModal
|
<SubscriptionUpgradeModal
|
||||||
isOpen={upgradeModal.isOpen}
|
isOpen={upgradeModal.isOpen}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ import {
|
|||||||
VStack,
|
VStack,
|
||||||
HStack,
|
HStack,
|
||||||
SimpleGrid,
|
SimpleGrid,
|
||||||
Link,
|
|
||||||
useBreakpointValue
|
useBreakpointValue
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useAuth } from '../../contexts/AuthContext';
|
import { useAuth } from '../../contexts/AuthContext';
|
||||||
@@ -400,31 +399,6 @@ export default function HomePage() {
|
|||||||
</Container>
|
</Container>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* 底部区域 */}
|
|
||||||
<Box
|
|
||||||
bg="linear-gradient(135deg, #0E0C15 0%, #15131D 100%)"
|
|
||||||
py={{ base: 8, md: 12 }}
|
|
||||||
position="relative"
|
|
||||||
>
|
|
||||||
<Container maxW="7xl" position="relative" zIndex={1} px={containerPx}>
|
|
||||||
<VStack spacing={{ base: 4, md: 6 }} textAlign="center">
|
|
||||||
<Text color="whiteAlpha.600" fontSize={{ base: 'xs', md: 'sm' }}>
|
|
||||||
© 2024 价值前沿. 保留所有权利.
|
|
||||||
</Text>
|
|
||||||
<HStack spacing={{ base: 2, md: 4 }} fontSize="xs" color="whiteAlpha.500" flexWrap="wrap" justify="center">
|
|
||||||
<Link
|
|
||||||
href="https://beian.mps.gov.cn/#/query/webSearch?code=11010802046286"
|
|
||||||
isExternal
|
|
||||||
color="whiteAlpha.500"
|
|
||||||
_hover={{ color: 'whiteAlpha.700' }}
|
|
||||||
>
|
|
||||||
京公网安备11010802046286号
|
|
||||||
</Link>
|
|
||||||
<Text>京ICP备2025107343号-1</Text>
|
|
||||||
</HStack>
|
|
||||||
</VStack>
|
|
||||||
</Container>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -23,7 +23,6 @@ import {
|
|||||||
StatArrow,
|
StatArrow,
|
||||||
Alert,
|
Alert,
|
||||||
AlertIcon,
|
AlertIcon,
|
||||||
Link,
|
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import {
|
import {
|
||||||
RepeatIcon,
|
RepeatIcon,
|
||||||
@@ -493,26 +492,6 @@ export default function LimitAnalyse() {
|
|||||||
</VStack>
|
</VStack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* Footer区域 */}
|
|
||||||
<Box bg={useColorModeValue('gray.100', 'gray.800')} py={6} mt={8}>
|
|
||||||
<Container maxW="7xl">
|
|
||||||
<VStack spacing={2}>
|
|
||||||
<Text color="gray.500" fontSize="sm">
|
|
||||||
© 2024 价值前沿. 保留所有权利.
|
|
||||||
</Text>
|
|
||||||
<HStack spacing={4} fontSize="xs" color="gray.400">
|
|
||||||
<Link
|
|
||||||
href="https://beian.mps.gov.cn/#/query/webSearch?code=11010802046286"
|
|
||||||
isExternal
|
|
||||||
_hover={{ color: 'gray.600' }}
|
|
||||||
>
|
|
||||||
京公网安备11010802046286号
|
|
||||||
</Link>
|
|
||||||
<Text>京ICP备2025107343号-1</Text>
|
|
||||||
</HStack>
|
|
||||||
</VStack>
|
|
||||||
</Container>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,6 @@ import {
|
|||||||
Progress,
|
Progress,
|
||||||
Tag,
|
Tag,
|
||||||
TagLabel,
|
TagLabel,
|
||||||
Link,
|
|
||||||
Skeleton,
|
Skeleton,
|
||||||
SkeletonText,
|
SkeletonText,
|
||||||
Popover,
|
Popover,
|
||||||
@@ -1055,26 +1054,6 @@ const StockOverview = () => {
|
|||||||
</Box>
|
</Box>
|
||||||
</Container>
|
</Container>
|
||||||
|
|
||||||
{/* Footer区域 */}
|
|
||||||
<Box bg={useColorModeValue('gray.100', 'gray.800')} py={6} mt={8}>
|
|
||||||
<Container maxW="7xl">
|
|
||||||
<VStack spacing={2}>
|
|
||||||
<Text color="gray.500" fontSize="sm">
|
|
||||||
© 2024 价值前沿. 保留所有权利.
|
|
||||||
</Text>
|
|
||||||
<HStack spacing={4} fontSize="xs" color="gray.400">
|
|
||||||
<Link
|
|
||||||
href="https://beian.mps.gov.cn/#/query/webSearch?code=11010802046286"
|
|
||||||
isExternal
|
|
||||||
_hover={{ color: 'gray.600' }}
|
|
||||||
>
|
|
||||||
京公网安备11010802046286号
|
|
||||||
</Link>
|
|
||||||
<Text>京ICP备2025107343号-1</Text>
|
|
||||||
</HStack>
|
|
||||||
</VStack>
|
|
||||||
</Container>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ import {
|
|||||||
AlertIcon,
|
AlertIcon,
|
||||||
AlertTitle,
|
AlertTitle,
|
||||||
AlertDescription,
|
AlertDescription,
|
||||||
Link,
|
|
||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { useAuth } from '../../contexts/AuthContext';
|
import { useAuth } from '../../contexts/AuthContext';
|
||||||
import { logger } from '../../utils/logger';
|
import { logger } from '../../utils/logger';
|
||||||
@@ -389,26 +388,6 @@ export default function TradingSimulation() {
|
|||||||
)}
|
)}
|
||||||
</Container>
|
</Container>
|
||||||
|
|
||||||
{/* Footer区域 */}
|
|
||||||
<Box bg={useColorModeValue('gray.100', 'gray.800')} py={6} mt={8}>
|
|
||||||
<Container maxW="7xl">
|
|
||||||
<VStack spacing={2}>
|
|
||||||
<Text color="gray.500" fontSize="sm">
|
|
||||||
© 2024 价值前沿. 保留所有权利.
|
|
||||||
</Text>
|
|
||||||
<HStack spacing={4} fontSize="xs" color="gray.400">
|
|
||||||
<Link
|
|
||||||
href="https://beian.mps.gov.cn/#/query/webSearch?code=11010802046286"
|
|
||||||
isExternal
|
|
||||||
_hover={{ color: 'gray.600' }}
|
|
||||||
>
|
|
||||||
京公网安备11010802046286号
|
|
||||||
</Link>
|
|
||||||
<Text>京ICP备2025107343号-1</Text>
|
|
||||||
</HStack>
|
|
||||||
</VStack>
|
|
||||||
</Container>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user