Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const root = document.querySelector('[role=application]')
const data = root.dataset
lang =
__TARGET__ === 'mobile' && navigator && navigator.language
? navigator.language.slice(0, 2)
: data.cozyLocale || 'en'
setupD3Locale(lang)
history = setupHistory()
client = await getClient(persistedState)
store = configureStore(client, persistedState)
client.registerPlugin(CleanupStoreClientPlugin, { store })
client.registerPlugin(PinPlugin)
client.registerPlugin(flag.plugin)
client.registerPlugin(StartupChecksPlugin, {
launchTriggers: [
{
slug: 'banks',
name: 'autogroups',
type: '@event',
policy: 'never-executed'
}
],
// Delay startup checks to lessen the load at page startup
delay: 5000
})
client.setStore(store)