save state selected in modal filter, filter list with location selected, save data sort, filter list with sort point, real all url from .env file, change name of value category and specialties to persian and change functional find data with field
This commit is contained in:
@@ -6,19 +6,21 @@ async function Doctor({ params: { slug } }) {
|
||||
let doctors = null;
|
||||
let doctor = null;
|
||||
let comments = null;
|
||||
const API_URL = process.env.NEXT_PUBLIC_API_URL;
|
||||
|
||||
try {
|
||||
const resDoctors = await axios.get(
|
||||
"https://back-dev.clinic-pro.ir/api/v1/doctors?active=1"
|
||||
`${API_URL}/api/v1/doctors?active=1`
|
||||
);
|
||||
const resDoctor = await axios.get(
|
||||
`https://back-dev.clinic-pro.ir/api/v1/doctor/${slug}`
|
||||
`${API_URL}/api/v1/doctor/${slug}`
|
||||
);
|
||||
|
||||
doctor = resDoctor.data;
|
||||
doctors = resDoctors.data.data;
|
||||
if (doctor) {
|
||||
const resComments = await axios.get(
|
||||
`https://back-dev.clinic-pro.ir/api/v1/clinicpro/comments/${doctor.id}`
|
||||
`${API_URL}/api/v1/clinicpro/comments/${doctor.id}`
|
||||
);
|
||||
comments = resComments?.data?.data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user