import 'antd/dist/antd.min.css' import './App.scss'; import { Router, Route, Switch, Redirect } from 'react-router-dom'; import createHistory from "history/createBrowserHistory"; import { connect, Provider } from 'react-redux'; import store from './redux/redux-store'; import { Authorization } from './pages/Authorization'; import { CPostsTapeMyFollowing } from './pages/PostsTapeMyFollowing'; import HeaderComponent from './components/header/Header'; import { CProfilePage } from './pages/ProfilePage'; import { CAllPostsTape } from './pages/AllPostsTape'; import { CCollectionPage } from './pages/CollectionPage'; import { CSettingsPage } from './pages/SettingsPage'; import { CEditPostPage } from './pages/EditPostPage'; import { CPostOnePage } from './pages/PostOnePage'; import { CRRoute } from './hoc/RRoute'; import { FooterComponet } from './components/FooterComponent'; import { useMediaQuery } from 'react-responsive'; export const history = createHistory() const Main = ({ children }) =>
{children}
const Content = ({ children }) => <>{children} const AppContent = ({ isToken }) => { const isTabletDevice = useMediaQuery({ query: "(max-width: 786px)" }) return {!isToken ? :
{isTabletDevice && }
}
} const CAppContent = connect(state => ({ isToken: state.auth?.token }))(AppContent) store.subscribe(() => console.log(store.getState())) function App() { return ( ) } export default App;