mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Dates are stored as strings in the API response
This commit is contained in:
parent
23b1f13522
commit
844ac6ef12
2 changed files with 3 additions and 8 deletions
|
|
@ -13,8 +13,8 @@ export type Subscription = {
|
|||
description?: string
|
||||
|
||||
status: SubscriptionStatus
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
type SubscriptionsQueryResponse = {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import {
|
|||
} from '../../components/templates/settings/SettingsTable'
|
||||
import { StyledText } from '../../components/elements/StyledText'
|
||||
import Link from 'next/link'
|
||||
import { formattedShortDate } from '../../lib/dateFormatting'
|
||||
|
||||
export default function SubscriptionsPage(): JSX.Element {
|
||||
const { subscriptions, revalidate } = useGetSubscriptionsQuery()
|
||||
|
|
@ -28,12 +29,6 @@ export default function SubscriptionsPage(): JSX.Element {
|
|||
revalidate()
|
||||
}
|
||||
|
||||
function formattedShortDate(date: Date): string {
|
||||
return new Intl.DateTimeFormat('en-US', {
|
||||
dateStyle: 'short',
|
||||
}).format(date)
|
||||
}
|
||||
|
||||
return (
|
||||
<SettingsTable
|
||||
pageId="settings-subscriptions-tag"
|
||||
|
|
|
|||
Loading…
Reference in a new issue