feat: 手机验证码调试
This commit is contained in:
@@ -36,22 +36,10 @@ const ProtectedRoute = ({ children }) => {
|
||||
);
|
||||
}
|
||||
|
||||
// 未登录时显示占位符(弹窗会自动打开)
|
||||
// 未登录时,渲染子组件 + 自动打开弹窗(通过 useEffect)
|
||||
// 弹窗会在 useEffect 中自动触发,页面正常显示
|
||||
if (!isAuthenticated || !user) {
|
||||
return (
|
||||
<Box
|
||||
height="100vh"
|
||||
display="flex"
|
||||
alignItems="center"
|
||||
justifyContent="center"
|
||||
bg="gray.50"
|
||||
>
|
||||
<VStack spacing={4}>
|
||||
<Spinner size="xl" color="blue.500" thickness="4px" />
|
||||
<Text fontSize="lg" color="gray.600">请先登录...</Text>
|
||||
</VStack>
|
||||
</Box>
|
||||
);
|
||||
return children;
|
||||
}
|
||||
|
||||
// 已登录,渲染子组件
|
||||
|
||||
Reference in New Issue
Block a user