generated from RedHatInsights/frontend-starter-app
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: remove sample page and unused packages
- Loading branch information
Showing
9 changed files
with
52 additions
and
290 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,8 @@ | ||
import React, { Fragment, useEffect } from 'react'; | ||
import { useHistory } from 'react-router-dom'; | ||
import { Routes } from './Routes'; | ||
import React, { Fragment } from 'react'; | ||
import './App.scss'; | ||
|
||
import { getRegistry } from '@redhat-cloud-services/frontend-components-utilities/Registry'; | ||
import NotificationsPortal from '@redhat-cloud-services/frontend-components-notifications/NotificationPortal'; | ||
import { notificationsReducer } from '@redhat-cloud-services/frontend-components-notifications/redux'; | ||
import { useChrome } from '@redhat-cloud-services/frontend-components/useChrome'; | ||
|
||
const App = (props) => { | ||
const history = useHistory(); | ||
const { on: onChromeEvent } = useChrome(); | ||
|
||
useEffect(() => { | ||
const registry = getRegistry(); | ||
const unregister = onChromeEvent('APP_NAVIGATION', (event) => history.push(`/${event.navId}`)); | ||
registry.register({ notifications: notificationsReducer }); | ||
|
||
return () => { | ||
unregister?.(); | ||
}; | ||
}, []); | ||
|
||
return ( | ||
<Fragment> | ||
<NotificationsPortal /> | ||
<Routes childProps={props} /> | ||
</Fragment> | ||
); | ||
const App = () => { | ||
return <Fragment></Fragment>; | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,6 @@ | ||
import React from 'react'; | ||
import { BrowserRouter as Router } from 'react-router-dom'; | ||
import { Provider } from 'react-redux'; | ||
import { init } from './store'; | ||
import App from './App'; | ||
import { getBaseName } from '@redhat-cloud-services/frontend-components-utilities/helpers'; | ||
import logger from 'redux-logger'; | ||
|
||
const AppEntry = () => ( | ||
<Provider store={init(...(process.env.NODE_ENV !== 'production' ? [logger] : [])).getStore()}> | ||
<Router basename={getBaseName(window.location.pathname)}> | ||
<App /> | ||
</Router> | ||
</Provider> | ||
); | ||
const AppEntry = () => <App />; | ||
|
||
export default AppEntry; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.