refactor: add location address handling in DateTime component and update Hours component to display address
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import List from "./List";
|
||||
import Loading from "./Loading";
|
||||
|
||||
function Hours({ appo, doctor, hour, setHour, value, nameHours }) {
|
||||
function Hours({ appo, doctor, hour, setHour, value, nameHours, locationAddress }) {
|
||||
if (appo === "loading") {
|
||||
return <Loading />;
|
||||
} else if (typeof appo === "string") {
|
||||
@@ -11,7 +11,21 @@ function Hours({ appo, doctor, hour, setHour, value, nameHours }) {
|
||||
</p>
|
||||
);
|
||||
} else {
|
||||
return <List appo={appo} hour={hour} value={value} setHour={setHour} />;
|
||||
return (
|
||||
<>
|
||||
<List appo={appo} hour={hour} value={value} setHour={setHour} />
|
||||
{locationAddress && (
|
||||
<div className="mt-4 p-3 bg-[#F5F5F5] dark:bg-[#2A2A2A] rounded-lg">
|
||||
<p className="text-[#616161] dark:text-[#A1A1A1] text-[14px] font-medium mb-1">
|
||||
آدرس مطب:
|
||||
</p>
|
||||
<p className="text-[#3B3B3B] dark:text-[#D7D8ED] text-[14px] font-normal">
|
||||
{locationAddress}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user