From 20c0cb6a4bd6ba8d8d44d735766e4fbc793ce754 Mon Sep 17 00:00:00 2001 From: Linus Pahl <46300478+linuspahl@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:17:42 +0100 Subject: [PATCH] Make `WidgetContext` a singleton. (#21134) --- .../src/views/components/contexts/WidgetContext.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graylog2-web-interface/src/views/components/contexts/WidgetContext.tsx b/graylog2-web-interface/src/views/components/contexts/WidgetContext.tsx index 8d0a23cf0d08..61178554a057 100644 --- a/graylog2-web-interface/src/views/components/contexts/WidgetContext.tsx +++ b/graylog2-web-interface/src/views/components/contexts/WidgetContext.tsx @@ -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(undefined); -export default WidgetContext; +export default singleton('contexts.WidgetContext', () => WidgetContext);