Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nirgur committed Sep 29, 2024
1 parent 0741e62 commit 2846114
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@ export default () => (
justifyContent: 'center'
}}
>
<h1>User Profile</h1>
<h1>Applications Portal</h1>
<ApplicationsPortal
widgetId="applications-portal-widget"
onLogout={() => {
window.location.href = '/login';
}}
/>
</div>
);
9 changes: 0 additions & 9 deletions packages/sdks/react-sdk/src/components/ApplicationsPortal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@ const ApplicationsPortal = React.forwardRef<
innerRef.logger = logger;
}
}, [innerRef, logger]);

useEffect(() => {
if (innerRef && onLogout) {
innerRef.addEventListener('logout', onLogout);
return () => innerRef.removeEventListener('logout', onLogout);
}
return undefined;
}, [innerRef, onLogout]);

return (
<Suspense fallback={null}>
<ApplicationsPortalWC
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- eslint-disable vue/multi-word-component-names -->
<template>
<div class="applications-portal-wrapper">
<h1>Applications Portal!!</h1>
<h1>Applications Portal</h1>
<ApplicationsPortal widget-id="applications-portal-widget" />
</div>
</template>
Expand Down
4 changes: 3 additions & 1 deletion packages/sdks/web-component/src/lib/descope-wc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ if (!customElements.get('descope-wc')) {
}
export default DescopeWc;

export type { AutoFocusOptions, ThemeOptions, ILogger } from '../types';
export type ILogger = Partial<DescopeWc['logger']>

export type { AutoFocusOptions, ThemeOptions } from '../types';
7 changes: 0 additions & 7 deletions packages/sdks/web-component/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,6 @@ export interface Context {
abTestingKey?: number;
}

export interface ILogger {
info(title: string, description: string, state: any): void;
warn(title: string, description?: string): void;
debug(title: string, description?: string): void;
error(title: string, description?: string, ...optionalParams: any[]): void;
}

export type DescopeUI = Record<string, () => Promise<void>> & {
componentsThemeManager: Record<string, any>;
};
Expand Down

0 comments on commit 2846114

Please sign in to comment.