12 lines
372 B
TypeScript

export const getFullUrl = (url?: string) => {
const BASE_URL = 'https://sg-delivery-api.convexsol.co';
if (!url) return '';
return url.startsWith('/') ? `${BASE_URL}${url}` : url;
};
export const isPdf = (fileNameOrUrl?: string) => {
if (!fileNameOrUrl) return false;
const clean = fileNameOrUrl.toLowerCase().split('?')[0];
return clean.endsWith('.pdf');
};