Skip to content

Commit

Permalink
Make WidgetContext a singleton. (#21134)
Browse files Browse the repository at this point in the history
  • Loading branch information
linuspahl authored Dec 6, 2024
1 parent 81ecd12 commit 20c0cb6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
*/
import * as React from 'react';

import { singleton } from 'logic/singleton';
import type Widget from 'views/logic/widgets/Widget';

const WidgetContext = React.createContext<Widget | undefined>(undefined);

export default WidgetContext;
export default singleton('contexts.WidgetContext', () => WidgetContext);

0 comments on commit 20c0cb6

Please sign in to comment.