reogranizing

This commit is contained in:
Dexter 2022-02-15 14:44:09 +00:00 committed by Dexter Edwards
parent 159cdb6023
commit 816a3df352
65 changed files with 28 additions and 51 deletions

View File

@ -1,4 +1,3 @@
import React from 'react';
import { render, screen } from '@testing-library/react'; import { render, screen } from '@testing-library/react';
import App from './App'; import App from './App';

View File

@ -1,11 +1,32 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars import './App.scss';
import styles from './app.module.scss';
import { Route, Link } from 'react-router-dom'; import { ApolloProvider } from '@apollo/client';
import App2 from './src/App';
export function App() { import { createClient } from './lib/apollo-client';
return <App2 />; import { Nav } from './components/nav';
import { Footer } from './components/footer';
import { Header } from './components/header';
import { Main } from './components/main';
import React from 'react';
import { DATA_SOURCES } from './config';
import { TendermintWebsocketProvider } from './contexts/websocket/tendermint-websocket-provider';
function App() {
const [client] = React.useState(createClient(DATA_SOURCES.dataNodeUrl));
return (
<TendermintWebsocketProvider>
<ApolloProvider client={client}>
<div className="app">
<div className="template-sidebar">
<Nav />
<Header />
<Main />
<Footer />
</div>
</div>
</ApolloProvider>
</TendermintWebsocketProvider>
);
} }
export default App; export default App;

View File

@ -1,33 +0,0 @@
import './App.scss';
import { ApolloProvider } from '@apollo/client';
import { createClient } from './lib/apollo-client';
import { BrowserRouter as Router } from 'react-router-dom';
import { Nav } from './components/nav';
import { Footer } from './components/footer';
import { Header } from './components/header';
import { Main } from './components/main';
import React from 'react';
import { DATA_SOURCES } from './config';
import { TendermintWebsocketProvider } from './contexts/websocket/tendermint-websocket-provider';
function App() {
const [client] = React.useState(createClient(DATA_SOURCES.dataNodeUrl));
return (
<TendermintWebsocketProvider>
<ApolloProvider client={client}>
<div className="app">
<div className="template-sidebar">
<Nav />
<Header />
<Main />
<Footer />
</div>
</div>
</ApolloProvider>
</TendermintWebsocketProvider>
);
}
export default App;

View File

@ -1,10 +0,0 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);

View File

@ -2,7 +2,7 @@ import { StrictMode } from 'react';
import * as ReactDOM from 'react-dom'; import * as ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom'; import { BrowserRouter } from 'react-router-dom';
import App from './app/app'; import App from './app/App';
ReactDOM.render( ReactDOM.render(
<StrictMode> <StrictMode>