Skip to content

Commit

Permalink
add different gfi config for internal use
Browse files Browse the repository at this point in the history
  • Loading branch information
jedi-of-the-sea committed Oct 7, 2024
1 parent c6cce20 commit f4484bc
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions packages/clients/dish/src/addPlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ const defaultOptions = {
layoutTag: NineLayoutTag.TOP_LEFT,
}

const pluginGfiExtern = {
coordinateSources: ['plugin/addressSearch/chosenAddress'],
gfiContentComponent: DishGfiContent,
afterLoadFunction: extendGfi,
}

const pluginGfiIntern = {}

function getPluginGfiConfig(mode: keyof typeof MODE) {
return mode === 'EXTERN' ? pluginGfiExtern : pluginGfiIntern
}

// this is fine for list-like setup functions
// eslint-disable-next-line max-lines-per-function
export const addPlugins = (core, mode: keyof typeof MODE = 'EXTERN') => {
Expand Down Expand Up @@ -125,12 +137,10 @@ export const addPlugins = (core, mode: keyof typeof MODE = 'EXTERN') => {
merge(
{},
{
displayComponent: mode === MODE.EXTERN,
displayComponent: true,
layoutTag: NineLayoutTag.TOP_LEFT,
coordinateSources: ['plugin/addressSearch/chosenAddress'],
gfiContentComponent: DishGfiContent,
afterLoadFunction: extendGfi,
}
},
getPluginGfiConfig(mode)
)
),
PolarPluginLoadingIndicator(
Expand Down

0 comments on commit f4484bc

Please sign in to comment.