diff --git a/src/components/default-listing.astro b/src/components/default-listing.astro index f1e1178..a0faffa 100644 --- a/src/components/default-listing.astro +++ b/src/components/default-listing.astro @@ -10,6 +10,7 @@ import RelatedLinks from '~/src/components/listing-parts/related-links.astro' import Devices from '~/src/components/listing-parts/devices.astro' import RelatedVideos from '~/src/components/listing-parts/related-videos.astro' import Bundles from '~/src/components/listing-parts/bundles.astro' +import LastUpdated from '~/src/components/listing-parts/last-updated.astro' import AllUpdatesSubscribe from '~/components/all-updates-subscribe.vue' @@ -65,4 +66,8 @@ const details = new ListingDetails( listing ) listing={ listing } /> + + diff --git a/src/components/listing-parts/last-updated.astro b/src/components/listing-parts/last-updated.astro new file mode 100644 index 0000000..a2c2a23 --- /dev/null +++ b/src/components/listing-parts/last-updated.astro @@ -0,0 +1,31 @@ +--- +import { makeLastUpdatedFriendly } from '~/helpers/parse-date.js' + +const { + listing +} = Astro.props + +console.log( 'listing.lastUpdated', listing.lastUpdated ) + +const lastUpdatedFriendly = makeLastUpdatedFriendly( listing.lastUpdated ) + +--- +
+ { lastUpdatedFriendly !== null && +
+ +
+ } + + Report Update +
+