Fix incorrect Calendar usage in OrderDetail.tsx
**Issue:**
- Runtime error: 'Calendar is not defined' on order detail page
- Line 340 and 458 used <Calendar /> instead of <CalendarIcon />
**Root Cause:**
- OrderDetail.tsx imports: `import { Calendar as CalendarIcon } from 'lucide-react'`
- But JSX used: `<Calendar className="w-5 h-5" />` instead of `<CalendarIcon />`
- This referenced an undefined 'Calendar' variable
**Fix:**
- Changed line 340: <Calendar /> → <CalendarIcon />
- Changed line 458: <Calendar /> → <CalendarIcon />
**Context:**
- CalendarIcon is the lucide-react icon component
- Calendar (without Icon suffix) doesn't exist in this file's scope
- Combined with App.tsx fix, this fully resolves the ReferenceError
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -337,7 +337,7 @@ export default function OrderDetail() {
|
|||||||
<Card className="border-2 border-border mb-6">
|
<Card className="border-2 border-border mb-6">
|
||||||
<CardHeader>
|
<CardHeader>
|
||||||
<CardTitle className="text-lg flex items-center gap-2">
|
<CardTitle className="text-lg flex items-center gap-2">
|
||||||
<Calendar className="w-5 h-5" />
|
<CalendarIcon className="w-5 h-5" />
|
||||||
Informasi Order
|
Informasi Order
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
@@ -455,7 +455,7 @@ export default function OrderDetail() {
|
|||||||
Order ini telah dibatalkan secara otomatis karena waktu pembayaran habis.
|
Order ini telah dibatalkan secara otomatis karena waktu pembayaran habis.
|
||||||
</p>
|
</p>
|
||||||
<Button onClick={() => navigate("/consulting-booking")} className="shadow-sm">
|
<Button onClick={() => navigate("/consulting-booking")} className="shadow-sm">
|
||||||
<Calendar className="w-4 h-4 mr-2" />
|
<CalendarIcon className="w-4 h-4 mr-2" />
|
||||||
Buat Booking Baru
|
Buat Booking Baru
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user