Skip to content

Instantly share code, notes, and snippets.

@martinwairegi
Created October 5, 2021 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save martinwairegi/7f7fe4d4097d96690406d0799cb3b1c7 to your computer and use it in GitHub Desktop.
Save martinwairegi/7f7fe4d4097d96690406d0799cb3b1c7 to your computer and use it in GitHub Desktop.
import React from 'react';
import { Switch, Route, Link } from 'react-router-dom';
import { Layout, Typography, Space } from 'antd';
import { Exchanges, Homepage, News, Cryptocurrencies, CryptoDetails, Navbar } from './components';
import './App.css';
const App = () => (
<div className="app">
<div className="navbar">
<Navbar />
</div>
<div className="main">
<Layout>
<div className="routes">
<Switch>
<Route exact path="/">
<Homepage />
</Route>
<Route exact path="/exchanges">
<Exchanges />
</Route>
<Route exact path="/cryptocurrencies">
<Cryptocurrencies />
</Route>
<Route exact path="/crypto/:coinId">
<CryptoDetails />
</Route>
<Route exact path="/news">
<News />
</Route>
</Switch>
</div>
</Layout>
<div className="footer">
<Typography.Title level={5} style={{ color: 'white', textAlign: 'center' }}>Copyright © 2021
<Link to="/">
Martin Kimani.
</Link> <br />
All Rights Reserved.
</Typography.Title>
<Space>
<Link to="/">Home</Link>
<Link to="/exchanges">Exchanges</Link>
<Link to="/news">News</Link>
</Space>
</div>
</div>
</div>
);
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment