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"
},
"scripts": {
"start": "set HTTPS=true&&react-scripts start",
"start": "HTTPS=true react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"

View File

@ -67,7 +67,11 @@ const VehiclesMain = () => {
}
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
text={"Traffic Police Service"}
classes="mt-24"
@ -78,7 +82,14 @@ const VehiclesMain = () => {
{/* <p>Hello, {user.profile.given_name}.</p> */}
{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} />
</>
) : (
@ -86,11 +97,12 @@ const VehiclesMain = () => {
No vehicles yet.
</h3>
)}
<Button
text="Register A Vehicle"
classes={vehicleData && "self-start my-24"}
onClickEvent={() => history.push("/register")}
/>
{!vehicleData && (
<Button
text="Register A Vehicle"
onClickEvent={() => history.push("/register")}
/>
)}
</div>
);
};