-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add context instead of single contexts (#1163)
* chore: add context instead of single contexts * Create thirty-chicken-play.md
- Loading branch information
Showing
2 changed files
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@frontify/app-bridge-app": patch | ||
--- | ||
|
||
feat: add context instead of single contexts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
/* (c) Copyright Frontify Ltd., all rights reserved. */ | ||
|
||
import { AppBridgePlatformApp, type AssetActionContext, type AssetCreationContext } from '../AppBridgePlatformApp.ts'; | ||
import { AppBridgePlatformApp, type PlatformAppContext } from '../AppBridgePlatformApp.ts'; | ||
|
||
/** | ||
* This function just helps to get the Context | ||
*/ | ||
export const appContext = <T extends AssetActionContext | AssetCreationContext>(): T => { | ||
export const appContext = <T extends PlatformAppContext>(): T => { | ||
const appBridge = new AppBridgePlatformApp(); | ||
return appBridge.context().get() as T; | ||
}; |