MCPcopy Create free account
hub / github.com/dailydotdev/apps / migrate

Function migrate

packages/shared/src/contexts/SettingsContext.tsx:495–505  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

493 );
494
495 const migrate = async () => {
496 if (hasFlags(pending)) {
497 await setSettings({
498 ...settings,
499 flags: { ...settings.flags, ...pending },
500 });
501 }
502
503 dropGraduatedStoredFlags(userId);
504 setStoredFlagsRevision((revision) => revision + 1);
505 };
506
507 migrate().catch(() => {
508 hasMigratedFlagsRef.current = false;

Callers 1

SettingsContextProviderFunction · 0.85

Calls 3

hasFlagsFunction · 0.85
setSettingsFunction · 0.85
dropGraduatedStoredFlagsFunction · 0.85

Tested by

no test coverage detected