quivr/frontend/lib/components/ui/Toast/helpers/generateToastUniqueId.ts

6 lines
167 B
TypeScript
Raw Normal View History

export const generateToastUniqueId = () => {
const timestamp = Date.now();
const random = Math.floor(Math.random() * 10000);
return `${timestamp}-${random}`;
};