updates
This commit is contained in:
@@ -5,6 +5,7 @@ import { useLanguage } from '../i18n/LanguageContext'
|
||||
import { useAuth } from '../contexts/AuthContext'
|
||||
import { AppContext } from '../App'
|
||||
import Modal from '../components/Modal'
|
||||
import { SkeletonCard } from '../components/SkeletonLoader'
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:3001/api'
|
||||
|
||||
@@ -115,8 +116,11 @@ export default function Brands() {
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="flex items-center justify-center py-20">
|
||||
<div className="w-8 h-8 border-3 border-brand-primary border-t-transparent rounded-full animate-spin" />
|
||||
<div className="space-y-6">
|
||||
<div className="h-12 bg-surface-tertiary rounded-xl animate-pulse"></div>
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
{[...Array(3)].map((_, i) => <SkeletonCard key={i} />)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -150,7 +154,7 @@ export default function Brands() {
|
||||
<p className="text-sm text-text-tertiary">{t('brands.noBrands')}</p>
|
||||
</div>
|
||||
) : (
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 stagger-children">
|
||||
{brands.map(brand => {
|
||||
const displayName = lang === 'ar' && brand.name_ar ? brand.name_ar : brand.name
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user