web / lib/utils/data-export
lib/utils/data-export
Utility functions for data export formatting and URLs.
Pure functions with no React dependency — extracted from hooks so they can be used in both React and non-React contexts.
Functions
getExportDownloadUrl()
getExportDownloadUrl(
exportId):string
Get download URL for an export.
Parameters
exportId
number
Returns
string
formatExportDate()
formatExportDate(
dateString):string
Format date in a user-friendly way.
Parameters
dateString
string | null | undefined
Returns
string
getTimeUntilExpiry()
getTimeUntilExpiry(
expiresAt):string|null
Calculate time remaining until expiry.
Parameters
expiresAt
string | null | undefined
Returns
string | null
Last updated on