Repositions the Register button

This commit is contained in:
Vazhin Tayeb 2021-01-17 11:55:48 +03:00
parent b61de3ffa1
commit 594ac4c8cf
2 changed files with 20 additions and 8 deletions

View File

@ -17,7 +17,7 @@
"tailwindcss": "^2.0.2" "tailwindcss": "^2.0.2"
}, },
"scripts": { "scripts": {
"start": "set HTTPS=true&&react-scripts start", "start": "HTTPS=true react-scripts start",
"build": "react-scripts build", "build": "react-scripts build",
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject" "eject": "react-scripts eject"

View File

@ -67,7 +67,11 @@ const VehiclesMain = () => {
} }
return ( return (
<div className="flex flex-col xl:w-2/3 lg:w-4/5 w-11/12"> <div
className={`flex flex-col xl:w-2/3 lg:w-4/5 w-11/12 ${
!vehicleData && "items-center"
}`}
>
<Heading1 <Heading1
text={"Traffic Police Service"} text={"Traffic Police Service"}
classes="mt-24" classes="mt-24"
@ -78,7 +82,14 @@ const VehiclesMain = () => {
{/* <p>Hello, {user.profile.given_name}.</p> */} {/* <p>Hello, {user.profile.given_name}.</p> */}
{vehicleData ? ( {vehicleData ? (
<> <>
<Heading3>Your Vehicles:</Heading3> <div className="flex justify-between items-center">
<Heading3>Your Vehicles:</Heading3>
<Button
text="Register A Vehicle"
// classes={vehicleData && "self-start"}
onClickEvent={() => history.push("/register")}
/>
</div>
<Table vehicleData={vehicleData} /> <Table vehicleData={vehicleData} />
</> </>
) : ( ) : (
@ -86,11 +97,12 @@ const VehiclesMain = () => {
No vehicles yet. No vehicles yet.
</h3> </h3>
)} )}
<Button {!vehicleData && (
text="Register A Vehicle" <Button
classes={vehicleData && "self-start my-24"} text="Register A Vehicle"
onClickEvent={() => history.push("/register")} onClickEvent={() => history.push("/register")}
/> />
)}
</div> </div>
); );
}; };