fixed ScrollToTop import

This commit is contained in:
irtiza-h30
2021-06-22 18:59:42 -04:00
parent 01599ca670
commit 879c97f44d
2 changed files with 3 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ import React, { useState } from 'react';
import { Helmet } from 'react-helmet'; import { Helmet } from 'react-helmet';
import { Switch, Redirect } from 'react-router-dom'; import { Switch, Redirect } from 'react-router-dom';
import { ThemeProvider, GenericNotFound, ScrollToTop } from '@tip-wlan/wlan-cloud-ui-library'; import { ThemeProvider, GenericNotFound } from '@tip-wlan/wlan-cloud-ui-library';
import logo from 'images/tip-logo.png'; import logo from 'images/tip-logo.png';
import logoMobile from 'images/tip-logo-mobile.png'; import logoMobile from 'images/tip-logo-mobile.png';
@@ -75,7 +75,6 @@ const App = () => {
<Helmet titleTemplate={`%s - ${COMPANY}`} defaultTitle={COMPANY}> <Helmet titleTemplate={`%s - ${COMPANY}`} defaultTitle={COMPANY}>
<meta name="description" content={COMPANY} /> <meta name="description" content={COMPANY} />
</Helmet> </Helmet>
<ScrollToTop />
<Switch> <Switch>
<UnauthenticatedRoute exact path={ROUTES.login} component={Login} /> <UnauthenticatedRoute exact path={ROUTES.login} component={Login} />
<ProtectedRouteWithLayout exact path={ROUTES.root} component={RedirectToDashboard} /> <ProtectedRouteWithLayout exact path={ROUTES.root} component={RedirectToDashboard} />

View File

@@ -14,6 +14,7 @@ import { AUTH_TOKEN } from 'constants/index';
import { REFRESH_TOKEN } from 'graphql/mutations'; import { REFRESH_TOKEN } from 'graphql/mutations';
import { getItem, setItem, removeItem } from 'utils/localStorage'; import { getItem, setItem, removeItem } from 'utils/localStorage';
import history from 'utils/history'; import history from 'utils/history';
import { ScrollToTop } from '@tip-wlan/wlan-cloud-ui-library';
const API_URI = process.env.NODE_ENV === 'production' ? window.REACT_APP_API : process.env.API; const API_URI = process.env.NODE_ENV === 'production' ? window.REACT_APP_API : process.env.API;
const MOUNT_NODE = document.getElementById('root'); const MOUNT_NODE = document.getElementById('root');
@@ -102,6 +103,7 @@ const render = () => {
ReactDOM.render( ReactDOM.render(
<Router history={history}> <Router history={history}>
<ApolloProvider client={client}> <ApolloProvider client={client}>
<ScrollToTop />
<App /> <App />
</ApolloProvider> </ApolloProvider>
</Router>, </Router>,