mirror of
https://github.com/dergigi/boris.git
synced 2025-12-20 08:04:30 +01:00
refactor: remove calendar icon from publication date
- Remove calendar icon (faCalendar) from publication date display - Display only the formatted date text - Remove icon-specific CSS styling (gap, svg styles) - Cleaner, more minimal date display in top-right corner
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faHighlighter, faClock, faCalendar } from '@fortawesome/free-solid-svg-icons'
|
||||
import { faHighlighter, faClock } from '@fortawesome/free-solid-svg-icons'
|
||||
import { format } from 'date-fns'
|
||||
|
||||
interface ReaderHeaderProps {
|
||||
@@ -29,8 +29,7 @@ const ReaderHeader: React.FC<ReaderHeaderProps> = ({
|
||||
<img src={image} alt={title || 'Article image'} />
|
||||
{formattedDate && (
|
||||
<div className="publish-date-topright">
|
||||
<FontAwesomeIcon icon={faCalendar} />
|
||||
<span>{formattedDate}</span>
|
||||
{formattedDate}
|
||||
</div>
|
||||
)}
|
||||
{title && (
|
||||
@@ -63,8 +62,7 @@ const ReaderHeader: React.FC<ReaderHeaderProps> = ({
|
||||
<div className="reader-header">
|
||||
{formattedDate && (
|
||||
<div className="publish-date-topright">
|
||||
<FontAwesomeIcon icon={faCalendar} />
|
||||
<span>{formattedDate}</span>
|
||||
{formattedDate}
|
||||
</div>
|
||||
)}
|
||||
<h2 className="reader-title">{title}</h2>
|
||||
|
||||
Reference in New Issue
Block a user