Files
clinicpro/assets/admin/components/resources/ResourcesSubNav.tsx
T
hamed 6876135a53 feat: add BlogBodySanitizer for HTML sanitization on article save
- Implemented BlogBodySanitizer to clean HTML content before saving articles, ensuring security against XSS attacks.
- Added tests for BlogBodySanitizer to verify that unsafe tags and attributes are stripped from the content.
- Introduced ApiLeastPrivilegeTest to ensure that unauthorized users cannot access sensitive API routes, maintaining strict access control.
2026-08-07 21:13:38 +03:30

34 lines
1.1 KiB
TypeScript

import React from 'react';
import { Link, useLocation } from 'react-router';
const LINKS = [
{ to: '/admin/resources', label: 'منابع' },
{ to: '/admin/resources/types', label: 'نوع منابع' },
{ to: '/admin/resources/skills', label: 'مهارت‌ها' },
{ to: '/admin/resources/pools', label: 'استخر منابع' },
];
/**
* چهار صفحهٔ خانوادهٔ منابع، یک آیتم در منوی تنظیمات دارند؛ این نوار جابه‌جایی بینشان
* است. اگر هر چهار تا آیتم جدا در منو می‌گرفتند، منوی تنظیمات یک‌سوم بلندتر می‌شد بی‌آنکه
* چیزی روشن‌تر شود.
*/
export default function ResourcesSubNav() {
const { pathname } = useLocation();
return (
<div className="seg" style={{ marginBottom: 'var(--gap)', overflowX: 'auto', flexWrap: 'nowrap' }}>
{LINKS.map((l) => (
<Link
key={l.to}
to={l.to}
className={pathname === l.to ? 'active' : ''}
style={{ whiteSpace: 'nowrap' }}
>
{l.label}
</Link>
))}
</div>
);
}