export const generateId = () => {
  return Date.now().toString(36) + Math.random().toString(36).substring(2, 8)
}

export const formatTimestampToDate = (timestamp: number | null) => {
  if (!timestamp) return '';
  const date = new Date(timestamp * 1000);
  const day = date.getUTCDate().toString().padStart(2, '0');
  const month = (date.getUTCMonth() + 1).toString().padStart(2, '0');
  const year = date.getUTCFullYear();
  return `${year}-${month}-${day}`;
}
