Skip to content

Commit

Permalink
fix: 팝업 닫힘 실험
Browse files Browse the repository at this point in the history
  • Loading branch information
jikwan0327 committed Sep 22, 2023
1 parent a3cb088 commit 803e272
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/apis/popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,19 @@ export const useOpenPopUp = () => {

setToken(mdl_tknValue);

window.open(
const width = 500;
const height = 400;
const left = window.screenX + (window.outerWidth - width) / 2;
const top = window.screenY + (window.outerHeight - height) / 2;
var popup = window.open(
`/pass?mdl_tkn=${mdl_tknValue}`,
'_blank',
'resizable=no,width=570,height=830,left=50,top=50',
`resizable=no,width=${width},height=${height},left=${left},top=${top}`,
);

popup!.onunload = function () {
alert('팝업이 닫혔습니다');
};
},
},
);
Expand Down

0 comments on commit 803e272

Please sign in to comment.