mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 02:23:47 +00:00
fix: add news link to admin panel, prevent empty news section flash
- Add News item to marketing group in AdminPanel with NewspaperIcon - Add news nav/panel translations for all 4 locales (ru, en, zh, fa) - Don't render NewsSection until query confirms articles exist - Remove skeleton that caused brief flash when news list is empty
This commit is contained in:
@@ -259,6 +259,16 @@ const NetworkGraphIcon = () => (
|
||||
</svg>
|
||||
);
|
||||
|
||||
const NewspaperIcon = () => (
|
||||
<svg className="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={1.5}>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
d="M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 01-2.25 2.25M16.5 7.5V18a2.25 2.25 0 002.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 002.25 2.25h13.5M6 7.5h3v3H6v-3z"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
|
||||
const ChevronRightIcon = () => (
|
||||
<svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
|
||||
<path strokeLinecap="round" strokeLinejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />
|
||||
@@ -538,6 +548,13 @@ export default function AdminPanel() {
|
||||
iconBg: 'bg-error-500/20',
|
||||
iconColor: 'text-error-400',
|
||||
items: [
|
||||
{
|
||||
to: '/admin/news',
|
||||
icon: <NewspaperIcon />,
|
||||
title: t('admin.nav.news'),
|
||||
description: t('admin.panel.newsDesc'),
|
||||
permission: 'news:read',
|
||||
},
|
||||
{
|
||||
to: '/admin/campaigns',
|
||||
icon: <MegaphoneIcon />,
|
||||
|
||||
Reference in New Issue
Block a user