1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/frontend/src/index.tsx
Nuno Góis aaa96f71cb
feat: message banner (#2726)
Related to:
https://linear.app/unleash/issue/2-511/exploration-build-data-for-the-possibility-of-showing-an-alert-to-the
Namely:
https://unleash-internal.slack.com/archives/C046LV85N3C/p1671443897386729

The idea is to have a general message banner that can be controlled
through a feature flag in Unleash to display announcements, warnings,
informations, etc.

Currently using mock feature flags, but the idea is to bind this to a
feature flag we can manage in our Unleash instance, and use its payload
to provide information to end users whenever we want.

Co-authored-by: Gastón Fournier <gaston@getunleash.ai>
2022-12-22 15:16:51 +00:00

38 lines
1.6 KiB
TypeScript

import 'whatwg-fetch';
import 'themes/app.css';
import 'regenerator-runtime/runtime';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
import { ThemeProvider } from 'themes/ThemeProvider';
import { App } from 'component/App';
import { ScrollTop } from 'component/common/ScrollTop/ScrollTop';
import { AccessProvider } from 'component/providers/AccessProvider/AccessProvider';
import { basePath } from 'utils/formatPath';
import { FeedbackCESProvider } from 'component/feedback/FeedbackCESContext/FeedbackCESProvider';
import { AnnouncerProvider } from 'component/common/Announcer/AnnouncerProvider/AnnouncerProvider';
import { InstanceStatus } from 'component/common/InstanceStatus/InstanceStatus';
import { UIProviderContainer } from 'component/providers/UIProvider/UIProviderContainer';
import { MessageBanner } from 'component/common/MessageBanner/MessageBanner';
ReactDOM.render(
<UIProviderContainer>
<AccessProvider>
<BrowserRouter basename={basePath}>
<ThemeProvider>
<AnnouncerProvider>
<FeedbackCESProvider>
<InstanceStatus>
<MessageBanner />
<ScrollTop />
<App />
</InstanceStatus>
</FeedbackCESProvider>
</AnnouncerProvider>
</ThemeProvider>
</BrowserRouter>
</AccessProvider>
</UIProviderContainer>,
document.getElementById('app')
);