feat: replace iframe with chrome sidepanel (#5197)
fixes - #5201 https://github.com/twentyhq/twenty/assets/13139771/871019c6-6456-46b4-95dd-07ffb33eb4fd --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -0,0 +1,16 @@
|
||||
import { isDefined } from '~/utils/isDefined';
|
||||
|
||||
const changeSidePanelUrl = async (url: string) => {
|
||||
const { tab: activeTab } = await chrome.runtime.sendMessage({
|
||||
action: 'getActiveTab',
|
||||
});
|
||||
if (isDefined(activeTab) && isDefined(url)) {
|
||||
chrome.storage.local.set({ [`sidepanelUrl_${activeTab.id}`]: url });
|
||||
chrome.runtime.sendMessage({
|
||||
action: 'changeSidepanelUrl',
|
||||
message: { url },
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export default changeSidePanelUrl;
|
||||
Reference in New Issue
Block a user