refactor: 调整登录模态框渲染逻辑和docker-compose配置
将登录模态框的条件渲染移至hooks调用之后,确保路径处理完成 将docker-compose中的name字段改为container_name以符合最新语法规范
This commit is contained in:
@@ -30,10 +30,11 @@ const LoginModal: FC<LoginModalProps> = ({ isOpen, onClose, lang }) => {
|
||||
[onClose]
|
||||
);
|
||||
|
||||
if (!isOpen) return null;
|
||||
|
||||
const pathname = usePathname();
|
||||
const truePath = getTruePathFromPathname(pathname, lang);
|
||||
|
||||
if (!isOpen) return null;
|
||||
|
||||
// 使用 React Portal 将模态框渲染到 body 下,避免Z-index问题和父组件样式影响
|
||||
return createPortal(
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user