Simplify layout code

This commit is contained in:
Willian Mitsuda 2022-08-30 19:12:40 -03:00
parent 8a5fca753e
commit 94146d9004
No known key found for this signature in database
2 changed files with 38 additions and 40 deletions

View File

@ -26,13 +26,13 @@ const Home: React.FC = () => {
document.title = "Home | Otterscan"; document.title = "Home | Otterscan";
return ( return (
<div className="mx-auto flex flex-col grow pb-5"> <div className="flex flex-col items-center grow pb-5">
{isScanning && <CameraScanner turnOffScan={() => setScanning(false)} />} {isScanning && <CameraScanner turnOffScan={() => setScanning(false)} />}
<div className="m-5 mb-10 flex items-end grow max-h-64"> <div className="grow mt-5 mb-10 max-h-64 flex items-end">
<Logo /> <Logo />
</div> </div>
<form <form
className="flex flex-col" className="flex flex-col w-1/3"
onSubmit={handleSubmit} onSubmit={handleSubmit}
autoComplete="off" autoComplete="off"
spellCheck={false} spellCheck={false}
@ -65,7 +65,6 @@ const Home: React.FC = () => {
Search Search
</button> </button>
</form> </form>
<div className="mx-auto h-32">
<div className="text-lg text-link-blue hover:text-link-blue-hover font-bold"> <div className="text-lg text-link-blue hover:text-link-blue-hover font-bold">
{provider?.network.chainId !== 11155111 && ( {provider?.network.chainId !== 11155111 && (
<NavLink to="/special/london"> <NavLink to="/special/london">
@ -105,7 +104,6 @@ const Home: React.FC = () => {
</div> </div>
)} )}
</div> </div>
</div>
); );
}; };

View File

@ -2,7 +2,7 @@ import React from "react";
import Otter from "./otter.jpg"; import Otter from "./otter.jpg";
const Logo: React.FC = () => ( const Logo: React.FC = () => (
<div className="mx-auto text-6xl text-link-blue font-title font-bold cursor-default flex items-center space-x-4"> <div className="text-6xl text-link-blue font-title font-bold cursor-default flex items-center justify-center space-x-4">
<img <img
className="rounded-full" className="rounded-full"
src={Otter} src={Otter}