Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const formatDate = (formatTemplate: string) => (date: DateDTO) => {
if (!date) {
return '-'
}
const localeKey = intl.getInitOptions().currentLocale!
return formatToTimeZone(date, formatTemplate, {
// No type interface..(https://github.com/prantlf/date-fns-timezone/issues/10)
locale: locales[localeKey],
timeZone: 'Asia/Seoul'
})
}
const acceptLanguageLink = setContext((_, { headers }) => {
const locale = intl.getInitOptions().currentLocale
return {
headers: {
...headers,
'Accept-Language': locale
}
}
})