Refactor footer to its component

This commit is contained in:
Caleb Okpara 2022-05-20 11:42:43 +00:00
parent b90847d566
commit 73848e8f0e
4 changed files with 25 additions and 15 deletions

View File

@ -289,7 +289,7 @@ form {
cursor: pointer; cursor: pointer;
@include responsive($xs) { @include responsive($xs) {
padding-bottom: 5px; padding-bottom: 15px;
} }
a { a {

View File

@ -1,9 +1,9 @@
import React from 'react'; import React, { ReactElement } from 'react';
import './App.scss'; import './App.scss';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import LoginPage from './Pages/Login'; import LoginPage from './Pages/Login';
function App() { function App(): ReactElement {
return ( return (
<div className="App"> <div className="App">
<div className="brand"> <div className="brand">

20
Accounts/src/Footer.tsx Normal file
View File

@ -0,0 +1,20 @@
import React, { FunctionComponent } from 'react';
import { Link } from 'react-router-dom';
const Footer: FunctionComponent = () => {
return (
<div className="footer">
<p>
<Link to="/">&copy; OneUptime</Link>
</p>
<p>
<Link to="/">Contact</Link>
</p>
<p>
<Link to="/">Privacy &amp; terms</Link>
</p>
</div>
);
};
export default Footer;

View File

@ -4,6 +4,7 @@ import BasicModelForm from 'CommonUI/src/Components/Forms/BasicModelForm';
import User from 'Common/Models/User'; import User from 'Common/Models/User';
import FormValues from 'CommonUI/src/Components/Forms/Types/FormValues'; import FormValues from 'CommonUI/src/Components/Forms/Types/FormValues';
import Route from 'Common/Types/API/Route'; import Route from 'Common/Types/API/Route';
import Footer from '../Footer';
const LoginPage: FunctionComponent = () => { const LoginPage: FunctionComponent = () => {
const user: User = new User(); const user: User = new User();
@ -50,18 +51,7 @@ const LoginPage: FunctionComponent = () => {
</p> </p>
</div> </div>
</BasicModelForm> </BasicModelForm>
<Footer />
<div className="footer">
<p>
<Link to="/">&copy; OneUptime</Link>
</p>
<p>
<Link to="/">Contact</Link>
</p>
<p>
<Link to="/">Privacy &amp; terms</Link>
</p>
</div>
</> </>
); );
}; };