mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
fix: news section — remove duplicate title, add newspaper icon, hide views from users, fix cache invalidation
This commit is contained in:
@@ -415,7 +415,7 @@ export default function NewsSection() {
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="relative overflow-hidden rounded-2xl bg-dark-900/50 backdrop-blur-xl">
|
||||
<section className="relative overflow-hidden rounded-2xl bg-dark-850/80 backdrop-blur-xl">
|
||||
<div className="px-5 py-8 sm:px-6 sm:py-10">
|
||||
{/* Header */}
|
||||
<motion.div
|
||||
|
||||
@@ -293,6 +293,7 @@ export default function AdminNews() {
|
||||
onSuccess: () => {
|
||||
haptic.success();
|
||||
queryClient.invalidateQueries({ queryKey: ['admin', 'news'] });
|
||||
queryClient.invalidateQueries({ queryKey: ['news'] });
|
||||
},
|
||||
});
|
||||
|
||||
@@ -301,6 +302,7 @@ export default function AdminNews() {
|
||||
onSuccess: () => {
|
||||
haptic.success();
|
||||
queryClient.invalidateQueries({ queryKey: ['admin', 'news'] });
|
||||
queryClient.invalidateQueries({ queryKey: ['news'] });
|
||||
},
|
||||
});
|
||||
|
||||
@@ -309,6 +311,7 @@ export default function AdminNews() {
|
||||
onSuccess: () => {
|
||||
haptic.success();
|
||||
queryClient.invalidateQueries({ queryKey: ['admin', 'news'] });
|
||||
queryClient.invalidateQueries({ queryKey: ['news'] });
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -30,17 +30,6 @@ const ClockIcon = () => (
|
||||
</svg>
|
||||
);
|
||||
|
||||
const EyeIcon = () => (
|
||||
<svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.5}>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
d="M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"
|
||||
/>
|
||||
<path strokeLinecap="round" strokeLinejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
const CalendarIcon = () => (
|
||||
<svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.5}>
|
||||
<path
|
||||
@@ -405,10 +394,6 @@ export default function NewsArticlePage() {
|
||||
<ClockIcon />
|
||||
{article.read_time_minutes} {t('news.readTime')}
|
||||
</span>
|
||||
<span className="inline-flex items-center gap-1.5 font-mono text-xs">
|
||||
<EyeIcon />
|
||||
{article.views_count} {t('news.views')}
|
||||
</span>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user