-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(QuoteBlock): assets do not unregister on switch off (#975)
* feat(QuoteBlock): assets do not unregister on switch off * fix review
- Loading branch information
1 parent
538cdba
commit 609001d
Showing
5 changed files
with
38 additions
and
23 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 |
---|---|---|
@@ -1,11 +1,9 @@ | ||
/* (c) Copyright Frontify Ltd., all rights reserved. */ | ||
|
||
import { useBlockAssets } from '@frontify/app-bridge'; | ||
import { type CustomIconProps } from './types'; | ||
|
||
export const CustomIcon = ({ style, customIconId, appBridge }: CustomIconProps) => { | ||
const { blockAssets } = useBlockAssets(appBridge); | ||
const customIconUrl = blockAssets?.[customIconId]?.[0]?.genericUrl; | ||
export const CustomIcon = ({ style, customIcon }: CustomIconProps) => { | ||
const customIconUrl = customIcon?.genericUrl; | ||
|
||
return customIconUrl ? <img style={style} alt="Quote Icon" src={customIconUrl} /> : null; | ||
}; |
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
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
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
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