forked from UKSOURCE/hailearning.edu.vn
6 lines
171 B
TypeScript
6 lines
171 B
TypeScript
export const imageUrl = (path?: string) => {
|
|
if (!path) return "";
|
|
if (path.startsWith("http")) return path;
|
|
return `${process.env.NEXT_PUBLIC_API_URL}/${path}`;
|
|
};
|