diff --git a/src/shared/@types/global.d.ts b/src/shared/@types/global.d.ts index cfa93ec..5d13333 100644 --- a/src/shared/@types/global.d.ts +++ b/src/shared/@types/global.d.ts @@ -45,6 +45,6 @@ declare global { }; saveToken: (token: LoginResponse) => void; alarmLink: (options: AlarmLinkOptions) => void; - onPressBackKey: () => void; + pressBackKey: () => void; } } \ No newline at end of file diff --git a/src/widgets/sub-layout/index.tsx b/src/widgets/sub-layout/index.tsx index 453a218..73f81e2 100644 --- a/src/widgets/sub-layout/index.tsx +++ b/src/widgets/sub-layout/index.tsx @@ -402,7 +402,7 @@ export const SubLayout = () => { } }; - const onPressBackKey = () => { + const pressBackKey = () => { let pathname = location.pathname; console.log('pathname = [' + pathname + ']'); if(menuOn){ @@ -419,7 +419,7 @@ export const SubLayout = () => { window.saveToken = saveToken; window.alarmLink = alarmLink; - window.onPressBackKey = onPressBackKey; + window.pressBackKey = pressBackKey; useEffect(() => { handleLogin();