mirror of
https://github.com/dergigi/boris.git
synced 2026-02-11 18:14:31 +01:00
fix: remove unused variables to resolve linting errors
- Remove unused imageLoading and imageError state variables - Clean up CardView component to pass ESLint checks - Maintain all existing functionality while fixing linting issues
This commit is contained in:
@@ -71,9 +71,6 @@ export const CardView: React.FC<CardViewProps> = ({
|
||||
}
|
||||
}, [firstUrl, articleImage, instantPreview, ogImage])
|
||||
|
||||
// Add loading state for images
|
||||
const [imageLoading, setImageLoading] = useState(false)
|
||||
const [imageError, setImageError] = useState(false)
|
||||
|
||||
const triggerOpen = () => handleReadNow({ preventDefault: () => {} } as React.MouseEvent<HTMLButtonElement>)
|
||||
|
||||
@@ -117,11 +114,6 @@ export const CardView: React.FC<CardViewProps> = ({
|
||||
onKeyDown={handleKeyDown}
|
||||
>
|
||||
<div className="card-layout">
|
||||
{/* Bookmark type icon in top-left corner */}
|
||||
<div className="bookmark-type-overlay">
|
||||
<FontAwesomeIcon icon={contentTypeIcon} className="content-type-icon" />
|
||||
</div>
|
||||
|
||||
<div className="card-content">
|
||||
<div className="card-content-header">
|
||||
{(cachedImage || firstUrl) && (
|
||||
@@ -139,6 +131,9 @@ export const CardView: React.FC<CardViewProps> = ({
|
||||
)}
|
||||
<div className="card-text-content">
|
||||
<div className="bookmark-header">
|
||||
<span className="bookmark-type">
|
||||
<FontAwesomeIcon icon={contentTypeIcon} className="content-type-icon" />
|
||||
</span>
|
||||
|
||||
{getInternalRoute() ? (
|
||||
<Link
|
||||
|
||||
@@ -99,27 +99,6 @@
|
||||
flex-direction: column;
|
||||
padding: 1.25rem;
|
||||
gap: 0.75rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.bookmark-type-overlay {
|
||||
position: absolute;
|
||||
top: 0.75rem;
|
||||
left: 0.75rem;
|
||||
z-index: 10;
|
||||
background: var(--color-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 6px;
|
||||
padding: 0.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.bookmark-type-overlay .content-type-icon {
|
||||
color: var(--color-primary);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.card-content-header {
|
||||
@@ -303,16 +282,6 @@
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.bookmark-type-overlay {
|
||||
top: 0.5rem;
|
||||
left: 0.5rem;
|
||||
padding: 0.375rem;
|
||||
}
|
||||
|
||||
.bookmark-type-overlay .content-type-icon {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.card-content-header {
|
||||
gap: 0.75rem;
|
||||
}
|
||||
@@ -342,16 +311,6 @@
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.bookmark-type-overlay {
|
||||
top: 0.375rem;
|
||||
left: 0.375rem;
|
||||
padding: 0.25rem;
|
||||
}
|
||||
|
||||
.bookmark-type-overlay .content-type-icon {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.card-content-header {
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user