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:
+4
-6
@@ -5,6 +5,7 @@ import axios from "axios";
|
||||
|
||||
async function Doctors({ searchParams }) {
|
||||
const { matchedCity, matchedState } = getStateInfo();
|
||||
const API_URL = process.env.NEXT_PUBLIC_API_URL;
|
||||
|
||||
let doctors = null;
|
||||
try {
|
||||
@@ -13,12 +14,9 @@ async function Doctors({ searchParams }) {
|
||||
if (matchedCity) params.city = matchedCity?.id || null;
|
||||
if (matchedState) params.state = matchedState?.id || null;
|
||||
|
||||
const response = await axios.get(
|
||||
"https://back-dev.clinic-pro.ir/api/v1/doctors",
|
||||
{
|
||||
params,
|
||||
}
|
||||
);
|
||||
const response = await axios.get(`${API_URL}/api/v1/doctors`, {
|
||||
params,
|
||||
});
|
||||
doctors = response.data.data;
|
||||
} catch (error) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user