feature/535 #3

Merged
afra.khalaj merged 3 commits from feature/535 into feature/WNPT-534 2026-08-09 02:27:42 -04:00
3 changed files with 30 additions and 10 deletions
Showing only changes of commit fdf1a57761 - Show all commits

View file

@ -1,8 +1,6 @@
import { Breadcrumb } from 'antd';
import { Home } from 'lucide';
import type { ReactNode } from 'react';
import { Link, useLocation } from 'react-router-dom';
import LucideIcon from '@/components/ui/LucideIcon';
import { sidebarItems } from '@/constants/navigation';
import { spacing } from '@/design/tokens/spacing';
@ -18,7 +16,6 @@ const PageBreadcrumb = () => {
const homeLabel = (
<span style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
<LucideIcon icon={Home} size={14} />
داشبورد
</span>
);

View file

@ -8,10 +8,12 @@ interface LucideIconProps extends SVGProps<SVGSVGElement> {
const toReactPropName = (name: string) => name.replace(/-([a-z])/g, (_, char) => char.toUpperCase());
const LucideIcon = ({ icon, ...props }: LucideIconProps): ReactElement => {
const LucideIcon = ({ icon, size, ...props }: LucideIconProps): ReactElement => {
const svgProps = {
...props,
xmlns: 'http://www.w3.org/2000/svg',
width: size,
height: size,
fill: 'none',
stroke: 'currentColor',
strokeWidth: 2,

View file

@ -1,5 +1,5 @@
import { App, Button, Card, Empty, Image, Spin, Tag, Tooltip, Typography } from 'antd';
import { ArrowRight, FileText } from 'lucide';
import { ArrowRight, FileText, Tag as TagIcon } from 'lucide';
import { useEffect, useState } from 'react';
import { Link, useNavigate, useParams } from 'react-router-dom';
import LucideIcon from '@/components/ui/LucideIcon';
@ -238,14 +238,35 @@ const AdDetail = () => {
</Card>
</div>
{/* Description + tags */}
{/* Description */}
<Card title="توضیحات" variant="outlined" style={sectionCardStyle}>
<Paragraph style={{ color: colors.text, whiteSpace: 'pre-wrap', marginBottom: spacing.md }}>
<Paragraph style={{ color: colors.text, whiteSpace: 'pre-wrap', margin: 0 }}>
{ad.description ?? <EmptyValue />}
</Paragraph>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 4 }}>
{ad.tags.length ? ad.tags.map((tag) => <Tag key={tag}>{tag}</Tag>) : <EmptyValue />}
</div>
</Card>
{/* Tags */}
<Card
title={
<span style={{ display: 'inline-flex', alignItems: 'center', gap: spacing.xs }}>
<LucideIcon icon={TagIcon} size={14} color={colors.textSecondary} />
برچسب‌ها
</span>
}
variant="outlined"
style={sectionCardStyle}
>
{ad.tags.length ? (
<div style={{ display: 'flex', flexWrap: 'wrap', gap: spacing.xs }}>
{ad.tags.map((tag) => (
<Tag key={tag} color={colors.primaryLight} style={{ color: colors.primary, fontSize: 13 }}>
{tag}
</Tag>
))}
</div>
) : (
<EmptyValue />
)}
</Card>
{/* Media */}