/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, {type ReactNode} from 'react';
import Link from '@docusaurus/Link';
import {translate} from '@docusaurus/Translate';
import {PageMetadata} from '@docusaurus/theme-common';
import {useDateTimeFormat} from '@docusaurus/theme-common/internal';
import Layout from '@theme/Layout';
import type {ArchiveBlogPost, Props} from '@theme/BlogArchivePage';
import Heading from '@theme/Heading';
type YearProp = {
year: string;
posts: ArchiveBlogPost[];
};
function Year({year, posts}: YearProp) {
const dateTimeFormat = useDateTimeFormat({
day: 'numeric',
month: 'long',
timeZone: 'UTC',
});
const formatDate = (lastUpdated: string) =>
dateTimeFormat.format(new Date(lastUpdated));
return (
<>
{year}