Hard coded the URL
This commit is contained in:
@@ -12,9 +12,7 @@ interface Props {
|
||||
}
|
||||
|
||||
async function getCountryManagers(country: string, language: Language = "en") {
|
||||
const res = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_APP_URL}/api/users/agents/${country}?language=${language}`
|
||||
);
|
||||
const res = await fetch(`https://platform.encoach.com/api/users/agents/${country}?language=${language}`);
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error("Failed to fetch contacts");
|
||||
@@ -24,9 +22,7 @@ async function getCountryManagers(country: string, language: Language = "en") {
|
||||
}
|
||||
|
||||
export async function generateStaticParamsHelper(language: Language = "en") {
|
||||
const contacts = (await fetch(
|
||||
`${process.env.NEXT_PUBLIC_APP_URL}/api/users/agents?language=${language}`
|
||||
).then((res) => res.json())) as Contact[];
|
||||
const contacts = (await fetch(`https://platform.encoach.com/api/users/agents?language=${language}`).then((res) => res.json())) as Contact[];
|
||||
return contacts.map(({key}) => ({
|
||||
country: key.toLowerCase().replaceAll(" ", ""),
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user