Skip to content

Commit a9b93a9

Browse files
committed
refactor(web): refactor-popup-container-to-separate-file
1 parent bd121e1 commit a9b93a9

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

web/src/layout/Header/DesktopHeader.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ import Menu from "./navbar/Menu";
2121
import Help from "./navbar/Menu/Help";
2222
import Settings from "./navbar/Menu/Settings";
2323

24-
import { PopupContainer } from ".";
25-
2624
const Container = styled.div`
2725
display: none;
2826
position: absolute;
@@ -79,6 +77,15 @@ const ConnectWalletContainer = styled.div`
7977
}
8078
`;
8179

80+
const PopupContainer = styled.div`
81+
position: fixed;
82+
top: 0;
83+
left: 0;
84+
width: 100%;
85+
height: 100%;
86+
z-index: 30;
87+
`;
88+
8289
const DesktopHeader = () => {
8390
const [isDappListOpen, toggleIsDappListOpen] = useToggle(false);
8491
const [isHelpOpen, toggleIsHelpOpen] = useToggle(false);

web/src/layout/Header/index.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,6 @@ const HeaderContainer = styled.div`
2323
padding: 4px 24px 8px;
2424
`;
2525

26-
export const PopupContainer = styled.div`
27-
position: fixed;
28-
top: 0;
29-
left: 0;
30-
width: 100%;
31-
height: 100%;
32-
z-index: 30;
33-
`;
34-
3526
const Header: React.FC = () => {
3627
return (
3728
<Container>

web/src/layout/Header/navbar/index.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import ConnectWallet from "components/ConnectWallet";
1212
import LightButton from "components/LightButton";
1313
import { Overlay } from "components/Overlay";
1414

15-
import { PopupContainer } from "..";
1615
import { useOpenContext } from "../MobileHeader";
1716

1817
import DappList from "./DappList";
@@ -72,6 +71,15 @@ const DisconnectWalletButtonContainer = styled.div`
7271
align-items: center;
7372
`;
7473

74+
const PopupContainer = styled.div`
75+
position: fixed;
76+
top: 0;
77+
left: 0;
78+
width: 100%;
79+
height: 100%;
80+
z-index: 30;
81+
`;
82+
7583
export interface ISettings {
7684
toggleIsSettingsOpen: () => void;
7785
}

0 commit comments

Comments
 (0)