update dashboard data and design and change req from ssr to csr & change design and data doctor and clinic item
This commit is contained in:
@@ -4,6 +4,8 @@ import Image from "next/image";
|
||||
import CustomLoading from "@/app/component/loading/Custom";
|
||||
|
||||
function Images({ data }) {
|
||||
const images_clinic = data.images_clinic;
|
||||
|
||||
return (
|
||||
<div
|
||||
className="
|
||||
@@ -15,12 +17,7 @@ function Images({ data }) {
|
||||
<CustomLoading width={600} height={400}>
|
||||
<Image
|
||||
className="rounded-[8px] overflow-hidden"
|
||||
src={
|
||||
(data?.images_clinic &&
|
||||
!!data?.images_clinic.length &&
|
||||
data?.images_clinic[0]) ||
|
||||
""
|
||||
}
|
||||
src={images_clinic[0].url || ""}
|
||||
alt="img clinic"
|
||||
height={432}
|
||||
width={600}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import CustomLoading from "@/app/component/loading/Custom";
|
||||
import Image from "next/image";
|
||||
import React from "react";
|
||||
|
||||
function Img({ url }) {
|
||||
return (
|
||||
<div className="w-full">
|
||||
<CustomLoading width="full" height={190}>
|
||||
<Image
|
||||
className="rounded-[8px] overflow-hidden"
|
||||
src={url || ""}
|
||||
alt="img clinic"
|
||||
height={204}
|
||||
width={288}
|
||||
/>
|
||||
</CustomLoading>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Img;
|
||||
@@ -1,73 +1,53 @@
|
||||
import CustomLoading from "@/app/component/loading/Custom";
|
||||
import Image from "next/image";
|
||||
import Img from "./Img";
|
||||
|
||||
function List({ data }) {
|
||||
const images_clinic = data.images_clinic;
|
||||
|
||||
return (
|
||||
<div className="hidden w-full md:grid grid-cols-2 gap-[16px] lg:gap-[24px]">
|
||||
<div className="w-full">
|
||||
<CustomLoading width="full" height={190}>
|
||||
<Image
|
||||
className="rounded-[8px] overflow-hidden"
|
||||
src={
|
||||
(data?.images_clinic &&
|
||||
!!data?.images_clinic.length &&
|
||||
data?.images_clinic[1]) ||
|
||||
""
|
||||
}
|
||||
alt="img clinic"
|
||||
height={204}
|
||||
width={288}
|
||||
/>
|
||||
</CustomLoading>
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<CustomLoading width="full" height={190}>
|
||||
<Image
|
||||
className="rounded-[8px] overflow-hidden"
|
||||
src={
|
||||
(data?.images_clinic &&
|
||||
!!data?.images_clinic.length &&
|
||||
data?.images_clinic[2]) ||
|
||||
""
|
||||
}
|
||||
alt="img clinic"
|
||||
height={204}
|
||||
width={288}
|
||||
/>
|
||||
</CustomLoading>
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<CustomLoading width="full" height={190}>
|
||||
<Image
|
||||
className="rounded-[8px] overflow-hidden"
|
||||
src={
|
||||
(data?.images_clinic &&
|
||||
!!data?.images_clinic.length &&
|
||||
data?.images_clinic[3]) ||
|
||||
""
|
||||
}
|
||||
alt="img clinic"
|
||||
height={204}
|
||||
width={288}
|
||||
/>
|
||||
</CustomLoading>
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<CustomLoading width="full" height={190}>
|
||||
<Image
|
||||
className="rounded-[8px] overflow-hidden"
|
||||
src={
|
||||
(data?.images_clinic &&
|
||||
!!data?.images_clinic.length &&
|
||||
data?.images_clinic[4]) ||
|
||||
""
|
||||
}
|
||||
alt="img clinic"
|
||||
height={204}
|
||||
width={288}
|
||||
/>
|
||||
</CustomLoading>
|
||||
</div>
|
||||
{images_clinic.map((img) => (
|
||||
<div className="w-full">
|
||||
<CustomLoading width="full" height={190}>
|
||||
<Image
|
||||
className="rounded-[8px] overflow-hidden"
|
||||
src={img.url || ""}
|
||||
alt="img clinic"
|
||||
height={204}
|
||||
width={288}
|
||||
/>
|
||||
</CustomLoading>
|
||||
</div>
|
||||
))}
|
||||
<Img
|
||||
url={
|
||||
data?.images_clinic &&
|
||||
!!data?.images_clinic.length &&
|
||||
data?.images_clinic[1]
|
||||
}
|
||||
/>
|
||||
<Img
|
||||
url={
|
||||
data?.images_clinic &&
|
||||
!!data?.images_clinic.length &&
|
||||
data?.images_clinic[2]
|
||||
}
|
||||
/>
|
||||
<Img
|
||||
url={
|
||||
data?.images_clinic &&
|
||||
!!data?.images_clinic.length &&
|
||||
data?.images_clinic[3]
|
||||
}
|
||||
/>
|
||||
<Img
|
||||
url={
|
||||
data?.images_clinic &&
|
||||
!!data?.images_clinic.length &&
|
||||
data?.images_clinic[4]
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user