알람 링크
This commit is contained in:
@@ -60,4 +60,8 @@ export interface AppAlarmUnreadCountParams {
|
|||||||
};
|
};
|
||||||
export interface AppAlarmUnreadCountResponse {
|
export interface AppAlarmUnreadCountResponse {
|
||||||
unreadCount: number;
|
unreadCount: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export interface AlarmLinkOptions {
|
||||||
|
linkUrl: string;
|
||||||
};
|
};
|
||||||
2
src/shared/@types/global.d.ts
vendored
2
src/shared/@types/global.d.ts
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
import { AlarmLinkOptions } from '@/entities/alarm/model/types';
|
||||||
import { LoginResponse } from '@/entities/user/model/types';
|
import { LoginResponse } from '@/entities/user/model/types';
|
||||||
import type { DefaultEvents, EventEmitter } from '@webview-bridge/web';
|
import type { DefaultEvents, EventEmitter } from '@webview-bridge/web';
|
||||||
|
|
||||||
@@ -43,5 +44,6 @@ declare global {
|
|||||||
postMessage: (data: string) => void;
|
postMessage: (data: string) => void;
|
||||||
};
|
};
|
||||||
saveToken: (token: LoginResponse) => void;
|
saveToken: (token: LoginResponse) => void;
|
||||||
|
alarmLink: (options: AlarmLinkOptions) => void;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -33,6 +33,7 @@ import { useBusinessPropertyMutation } from '@/entities/user/api/use-business-pr
|
|||||||
import { useUserFindAuthMethodMutation } from '@/entities/user/api/use-user-find-authmethod-mutation';
|
import { useUserFindAuthMethodMutation } from '@/entities/user/api/use-user-find-authmethod-mutation';
|
||||||
import { useCodesSelectMutation } from '@/entities/common/api/use-codes-select-mutation';
|
import { useCodesSelectMutation } from '@/entities/common/api/use-codes-select-mutation';
|
||||||
import { MenuItems } from '@/entities/common/model/constant';
|
import { MenuItems } from '@/entities/common/model/constant';
|
||||||
|
import { AlarmLinkOptions } from '@/entities/alarm/model/types';
|
||||||
|
|
||||||
export interface ContextType {
|
export interface ContextType {
|
||||||
setOnBack: (onBack: () => void) => void;
|
setOnBack: (onBack: () => void) => void;
|
||||||
@@ -325,8 +326,12 @@ export const SubLayout = () => {
|
|||||||
const saveToken = (token: LoginResponse) => {
|
const saveToken = (token: LoginResponse) => {
|
||||||
updateUserData(token);
|
updateUserData(token);
|
||||||
};
|
};
|
||||||
|
const alarmLink = (options: AlarmLinkOptions) => {
|
||||||
|
console.log(options);
|
||||||
|
};
|
||||||
|
|
||||||
window.saveToken = saveToken;
|
window.saveToken = saveToken;
|
||||||
|
window.alarmLink = alarmLink;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
handleLogin();
|
handleLogin();
|
||||||
|
|||||||
Reference in New Issue
Block a user