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

Function migrate

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

Source from the content-addressed store, hash-verified

546 );
547
548 const migrate = async () => {
549 if (hasFlags(pending)) {
550 await setSettings({
551 ...settings,
552 flags: { ...settings.flags, ...pending },
553 });
554 }
555
556 dropGraduatedStoredFlags(userId);
557 setStoredFlagsRevision((revision) => revision + 1);
558 };
559
560 migrate().catch(() => {
561 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