conditional update download csv for staging & prod
This commit is contained in:
@ -56,3 +56,6 @@ export function deepMerge(obj1: any, obj2: any): any {
|
||||
export function uniqueID(): string {
|
||||
return (Date.now() + Math.floor(Math.random() * 1000)).toString();
|
||||
}
|
||||
|
||||
const baseUrl = import.meta.env?.VITE_BASE_URL || '/';
|
||||
export const TEMPLATE_CSV_URL = `${baseUrl}template_notification.csv`;
|
||||
|
||||
@ -30,6 +30,7 @@ import { Check, ChevronDown, X } from 'lucide-react';
|
||||
import { initialStateNotification, selectedNotification, validateFormNotification } from './Types';
|
||||
import { useDebounce } from './useDebounce';
|
||||
import Papa from 'papaparse';
|
||||
import { TEMPLATE_CSV_URL } from '@/lib/helpers';
|
||||
|
||||
const API_URL_CUSTOMER = apiConfig.service_customer;
|
||||
const API_URL_NOTIFICATION = apiConfig.service_notification;
|
||||
@ -481,7 +482,7 @@ const AddDialog = () => {
|
||||
/>
|
||||
|
||||
<a
|
||||
href="/dashboard/template_notification.csv"
|
||||
href={TEMPLATE_CSV_URL}
|
||||
download
|
||||
className="px-3 py-2 rounded-md bg-blue-600 text-white text-sm font-medium hover:bg-blue-700"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user