Skip to content

Commit

Permalink
배포 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
dutexion committed Aug 8, 2024
1 parent 7f0b498 commit c068645
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
16 changes: 15 additions & 1 deletion src/components/common/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const Header = () => {
const { pathname } = useLocation();
const _pathname: string = pathname.substring(1);
const email = Cookie.get('email');
const [clickCount, setClickCount] = useState<number>(0);

usePathChangeEffect(() => {
const body = document.querySelector('body');
Expand All @@ -34,6 +35,13 @@ export const Header = () => {
};
}, []);

useEffect(() => {
if (clickCount > 10) {
localStorage.setItem('critical', 'true');
alert('이스터에그 발견');
}
}, [clickCount]);

return (
<>
<Wrapper scroll={scroll} pathname={_pathname}>
Expand Down Expand Up @@ -67,7 +75,13 @@ export const Header = () => {
<img src={LogoImg} />
<span>Xquare Infra</span>
</LeftSide2>
<RightSide2>{email ? email : ''}</RightSide2>
<RightSide2
onClick={() => {
setClickCount((prev) => prev + 1);
}}
>
{email ? email : ''}
</RightSide2>
</>
)}
<WrapperBackground scroll={_pathname === '' ? scroll : 0} />
Expand Down
1 change: 1 addition & 0 deletions src/pages/Team/deploy/Container/NoneContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export const TeamDeployNoneContainer = () => {
prod: requestData.prod,
stag: requestData.stag,
language: requestData.language,
critical_service: Boolean(localStorage.getItem('critical')) ?? false,
});

setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/types/containerType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ type ConfigType = {
domain: string;
};

export type ConfigPostType = { stag: ConfigType; prod: ConfigType; language: string };
export type ConfigPostType = { stag: ConfigType; prod: ConfigType; language: string; critical_service: boolean };

0 comments on commit c068645

Please sign in to comment.