fix(web): update dashboard pages, layouts, and listing forms
Update 12 page/layout files across auth, dashboard, listings, and search routes to improve type safety, fix component imports, and align with latest API changes. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -88,9 +88,9 @@ export default function EditListingPage() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mx-auto max-w-3xl space-y-6">
|
||||
<div className="flex items-center justify-between">
|
||||
<h1 className="text-2xl font-bold">Chỉnh sửa tin đăng</h1>
|
||||
<div className="mx-auto max-w-3xl space-y-4 sm:space-y-6">
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<h1 className="text-xl font-bold sm:text-2xl">Chỉnh sửa tin đăng</h1>
|
||||
<Button variant="outline" onClick={() => router.push(`/listings/${id}`)}>
|
||||
Xem tin
|
||||
</Button>
|
||||
@@ -102,7 +102,7 @@ export default function EditListingPage() {
|
||||
</p>
|
||||
|
||||
<Tabs value={activeTab} onValueChange={setActiveTab}>
|
||||
<TabsList className="grid w-full grid-cols-4">
|
||||
<TabsList className="grid w-full grid-cols-2 md:grid-cols-4">
|
||||
<TabsTrigger value="basic">Cơ bản</TabsTrigger>
|
||||
<TabsTrigger value="location">Vị trí</TabsTrigger>
|
||||
<TabsTrigger value="details">Chi tiết</TabsTrigger>
|
||||
|
||||
@@ -130,10 +130,10 @@ export default function CreateListingPage() {
|
||||
|
||||
return (
|
||||
<div className="mx-auto max-w-3xl">
|
||||
<h1 className="mb-6 text-2xl font-bold">Đăng tin mới</h1>
|
||||
<h1 className="mb-4 text-xl font-bold sm:mb-6 sm:text-2xl">Đăng tin mới</h1>
|
||||
|
||||
{/* Step indicators */}
|
||||
<div className="mb-8 flex items-center justify-between">
|
||||
<div className="mb-6 flex items-center justify-between sm:mb-8">
|
||||
{STEPS.map((step, index) => (
|
||||
<div key={step.title} className="flex items-center">
|
||||
<button
|
||||
@@ -161,7 +161,7 @@ export default function CreateListingPage() {
|
||||
{index < STEPS.length - 1 && (
|
||||
<div
|
||||
className={cn(
|
||||
'mx-3 h-px w-8 sm:w-12',
|
||||
'mx-1 h-px w-4 sm:mx-3 sm:w-8 md:w-12',
|
||||
index < currentStep ? 'bg-primary' : 'bg-muted',
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -10,6 +10,7 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/com
|
||||
import { Select } from '@/components/ui/select';
|
||||
import { formatPrice } from '@/lib/currency';
|
||||
import { useListingsSearch } from '@/lib/hooks/use-listings';
|
||||
import { shimmerBlurDataURL, staticBlurDataURL } from '@/lib/image-blur';
|
||||
import type { ListingDetail as _ListingDetail } from '@/lib/listings-api';
|
||||
import { PROPERTY_TYPES, TRANSACTION_TYPES, LISTING_STATUSES } from '@/lib/validations/listings';
|
||||
|
||||
@@ -190,6 +191,8 @@ export default function ListingsPage() {
|
||||
fill
|
||||
sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw"
|
||||
className="object-cover"
|
||||
placeholder="blur"
|
||||
blurDataURL={shimmerBlurDataURL()}
|
||||
/>
|
||||
) : (
|
||||
<div className="flex h-full items-center justify-center text-muted-foreground">
|
||||
@@ -270,6 +273,8 @@ export default function ListingsPage() {
|
||||
fill
|
||||
sizes="56px"
|
||||
className="object-cover"
|
||||
placeholder="blur"
|
||||
blurDataURL={staticBlurDataURL()}
|
||||
/>
|
||||
) : (
|
||||
<div className="flex h-full items-center justify-center text-xs text-muted-foreground">
|
||||
|
||||
Reference in New Issue
Block a user