change design poster and text head && design modal filter & data for filter and doctors & handle functionality filter, set in url, read from url and change state
This commit is contained in:
@@ -13,13 +13,13 @@ import PointD from "@/components/icons/PointD";
|
||||
|
||||
function ItemDoctor({ doctor, loading, setDoctors }) {
|
||||
const handleLoading = () => {
|
||||
setDoctors((prevDoctors) =>
|
||||
prevDoctors.map((item) =>
|
||||
item.id === doctor.id
|
||||
? { ...item, loading: true }
|
||||
: { ...item, loading: false }
|
||||
)
|
||||
);
|
||||
// setDoctors((prevDoctors) =>
|
||||
// prevDoctors.map((item) =>
|
||||
// item.id === doctor.id
|
||||
// ? { ...item, loading: true }
|
||||
// : { ...item, loading: false }
|
||||
// )
|
||||
// );
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
import { useState } from "react";
|
||||
import ItemUser from "./ItemUser";
|
||||
|
||||
function Comment({ data, comments }) {
|
||||
const [list, setList] = useState(data?.comments);
|
||||
function Comment({ comments }) {
|
||||
const [update, setUpdate] = useState(false);
|
||||
|
||||
return (
|
||||
|
||||
@@ -3,6 +3,7 @@ import { TextField } from "@mui/material";
|
||||
function Field({
|
||||
type,
|
||||
name,
|
||||
error,
|
||||
title,
|
||||
props,
|
||||
value,
|
||||
@@ -31,7 +32,9 @@ function Field({
|
||||
"& .MuiInputBase-input": { padding: "12.5px 14px" },
|
||||
"& .MuiInputBase-root": { borderRadius: "6px !important" },
|
||||
"& .MuiOutlinedInput-notchedOutline": {
|
||||
border: "1px solid #E9ECEF !important",
|
||||
border: error
|
||||
? "1px solid red !important"
|
||||
: "1px solid #E9ECEF !important",
|
||||
},
|
||||
".Mui-focused": {
|
||||
"& .MuiOutlinedInput-notchedOutline": {
|
||||
|
||||
@@ -2,33 +2,35 @@ import CloseModalD from "@/components/icons/CloseModalD";
|
||||
import Image from "next/image";
|
||||
|
||||
function Content({ data, onClose }) {
|
||||
console.log(data);
|
||||
|
||||
const { latitude, longitude } = data && data.map;
|
||||
|
||||
const maps = [
|
||||
{
|
||||
src: "/assets/images/snapp.png",
|
||||
name: "snapp",
|
||||
url: `https://snapp.ir/route?lat=${latitude}&lng=${longitude}`,
|
||||
url: `https://snapp.ir/route?lat=${"latitude"}&lng=${"longitude"}`,
|
||||
},
|
||||
{
|
||||
src: "/assets/images/tapsi.png",
|
||||
name: "tapsi",
|
||||
url: `https://tapsi.ir/route?lat=${latitude}&lng=${longitude}`,
|
||||
url: `https://tapsi.ir/route?lat=${"latitude"}&lng=${"longitude"}`,
|
||||
},
|
||||
{
|
||||
src: "/assets/images/maps.png",
|
||||
name: "maps",
|
||||
url: `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}`,
|
||||
url: `https://www.google.com/maps/dir/?api=1&destination=${"latitude"},${"longitude"}`,
|
||||
},
|
||||
{
|
||||
src: "/assets/images/balad.png",
|
||||
name: "balad",
|
||||
url: `https://balad.ir/map?lat=${latitude}&lng=${longitude}`,
|
||||
url: `https://balad.ir/map?lat=${"latitude"}&lng=${"longitude"}`,
|
||||
},
|
||||
{
|
||||
src: "/assets/images/waze.png",
|
||||
name: "waze",
|
||||
url: `https://waze.com/ul?ll=${latitude},${longitude}&navigate=yes`,
|
||||
url: `https://waze.com/ul?ll=${"latitude"},${"longitude"}&navigate=yes`,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -61,7 +63,7 @@ function Content({ data, onClose }) {
|
||||
height={40}
|
||||
width={40}
|
||||
/>
|
||||
<p className="text-[#3B3B3B] font-normal text-[14px]">
|
||||
<p className="text-[#3B3B3B] text-center font-normal text-[14px]">
|
||||
{item.name}
|
||||
</p>
|
||||
</a>
|
||||
|
||||
@@ -5,6 +5,8 @@ import { styleDefault } from "@/mui";
|
||||
import Content from "./Content";
|
||||
|
||||
function ModalOpenLocation({ open, data, setOpen, handleClose, children }) {
|
||||
console.log(data);
|
||||
|
||||
const toggleDrawer = (newOpen) => () => {
|
||||
setOpen(newOpen);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user