diff --git a/src/css/custom.scss b/src/css/custom.scss index f244902a..f4e9913e 100644 --- a/src/css/custom.scss +++ b/src/css/custom.scss @@ -327,3 +327,9 @@ div[class^='announcementBar_'] { width: 100%; } } + +.truncate { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} diff --git a/src/theme/BlogPostItem/Header/Info/index.tsx b/src/theme/BlogPostItem/Header/Info/index.tsx index ba6ed9bd..83af9fff 100644 --- a/src/theme/BlogPostItem/Header/Info/index.tsx +++ b/src/theme/BlogPostItem/Header/Info/index.tsx @@ -32,12 +32,12 @@ function useReadingTimePlural() { export function ReadingTime({ readingTime }: { readingTime: number }) { const readingTimePlural = useReadingTimePlural() - return <>{readingTimePlural(readingTime)} + return {readingTimePlural(readingTime)} } function Date({ date, formattedDate }: { date: string; formattedDate: string }) { return ( -