Fix imports and missing dependencies

This commit is contained in:
Your Name committed 2026-06-03 08:40:07 +07:00
1 parent f2179cfe57
commit 4af1d0e03b
32 files changed
+1655 -31

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
import { useState, useEffect, useMemo, useRef } from 'react'
import { useParams, useNavigate, Link } from 'react-router-dom'
import { API_BASE } from '@irelax/types'
import { API_BASE } from '@homaroma/types'
import { ArrowLeft, Save, Loader2, Image as ImageIcon } from 'lucide-react'
import ReactQuill from 'react-quill-new'
import 'react-quill-new/dist/quill.snow.css'
+1 -1
View File
@@ -1,6 +1,6 @@
import { useState, useEffect } from 'react'
import { Link } from 'react-router-dom'
import { API_BASE, type Article } from '@irelax/types'
import { API_BASE, type Article } from '@homaroma/types'
import { Plus, Edit, Trash2, Eye, EyeOff } from 'lucide-react'
export default function ArticlesPage() {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useState, useEffect } from 'react'
import { API_BASE, getCategoryImage, type Category } from '@irelax/types'
import { API_BASE, getCategoryImage, type Category } from '@homaroma/types'
import { Edit3, Package, Trash2, Plus, X, Image as ImageIcon, UploadCloud, Loader2, ClipboardPaste, LayoutDashboard } from 'lucide-react'
export default function CategoriesPage() {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useState, useEffect } from 'react'
import { API_BASE } from '@irelax/types'
import { API_BASE } from '@homaroma/types'
import { Edit3, Ticket, Trash2, Plus, X, Power, PowerOff } from 'lucide-react'
interface Coupon {
+1 -1
View File
@@ -1,5 +1,5 @@
import { useState, useEffect } from 'react'
import { API_BASE } from '@irelax/types'
import { API_BASE } from '@homaroma/types'
interface Customer {
id: number
+1 -1
View File
@@ -1,6 +1,6 @@
import { useState, useEffect } from 'react'
import { Package, Tag, Layers, TrendingUp } from 'lucide-react'
import { API_BASE, type Category, type Product } from '@irelax/types'
import { API_BASE, type Category, type Product } from '@homaroma/types'
export default function DashboardPage() {
const [stats, setStats] = useState({
+1 -1
View File
@@ -14,7 +14,7 @@ import {
Info,
ClipboardPaste
} from 'lucide-react'
import { API_BASE, type Hero } from '@irelax/types'
import { API_BASE, type Hero } from '@homaroma/types'
export default function HeroSettingsPage() {
const [heroes, setHeroes] = useState<Hero[]>([])
+1 -1
View File
@@ -1,7 +1,7 @@
import { useState } from 'react'
import { useNavigate } from 'react-router-dom'
import { Lock, User, AlertCircle, ArrowRight, Loader2 } from 'lucide-react'
import { API_BASE } from '@irelax/types'
import { API_BASE } from '@homaroma/types'
export default function LoginPage() {
const [username, setUsername] = useState('')
+1 -1
View File
@@ -1,6 +1,6 @@
import { useState, useEffect } from 'react'
import { useParams, Link } from 'react-router-dom'
import { API_BASE, formatPrice, type Order } from '@irelax/types'
import { API_BASE, formatPrice, type Order } from '@homaroma/types'
import { ArrowLeft, CheckCircle2, ExternalLink, Loader2, Truck, XCircle, FileImage } from 'lucide-react'
export default function OrderDetailPage() {
+1 -1
View File
@@ -1,6 +1,6 @@
import { useState, useEffect } from 'react'
import { Link } from 'react-router-dom'
import { API_BASE, formatPrice, type Order } from '@irelax/types'
import { API_BASE, formatPrice, type Order } from '@homaroma/types'
import { ChevronRight, Clock, CheckCircle2, Truck, XCircle } from 'lucide-react'
export default function OrdersPage() {
+1 -1
View File
@@ -16,7 +16,7 @@ import {
ExternalLink,
X
} from 'lucide-react'
import { API_BASE, getCategoryImage, formatPrice, type Category, type Product, type Variant, type ProductImage, type RawMaterial, type BomItem } from '@irelax/types'
import { API_BASE, getCategoryImage, formatPrice, type Category, type Product, type Variant, type ProductImage, type RawMaterial, type BomItem } from '@homaroma/types'
import ReactQuill from 'react-quill-new'
import 'react-quill-new/dist/quill.snow.css'
+1 -1
View File
@@ -15,7 +15,7 @@ import {
Loader2
} from 'lucide-react'
import { useNavigate, useSearchParams } from 'react-router-dom'
import { API_BASE, getCategoryImage, formatPrice, type Category, type Product } from '@irelax/types'
import { API_BASE, getCategoryImage, formatPrice, type Category, type Product } from '@homaroma/types'
interface PaginationMeta {
total: number;
+1 -1
View File
@@ -1,6 +1,6 @@
import { useState, useEffect } from 'react'
import { Plus, Edit3, Trash2, Loader2, PackageOpen } from 'lucide-react'
import { API_BASE, type RawMaterial } from '@irelax/types'
import { API_BASE, type RawMaterial } from '@homaroma/types'
export default function RawMaterialsPage() {
const [materials, setMaterials] = useState<RawMaterial[]>([])
+1 -1
View File
@@ -1,5 +1,5 @@
import { useState, useEffect } from 'react'
import { API_BASE, type StoreSettings } from '@irelax/types'
import { API_BASE, type StoreSettings } from '@homaroma/types'
import { Save, Loader2, Landmark, Truck } from 'lucide-react'
export default function SystemSettingsPage() {
+1 -1
View File
@@ -2,7 +2,7 @@ import Link from 'next/link'
import { notFound } from 'next/navigation'
import type { Metadata } from 'next'
import { ArrowLeft } from 'lucide-react'
import type { Article } from '@irelax/types'
import type { Article } from '@homaroma/types'
import { API_BASE } from '../../../lib/api'
+1 -1
View File
@@ -3,7 +3,7 @@ import { useState, useEffect, useRef } from 'react'
import Link from 'next/link'
import { useParams } from 'next/navigation'
import ProductCard from '../../../components/ProductCard'
import { getCategoryImage, type Category, type Product } from '@irelax/types'
import { getCategoryImage, type Category, type Product } from '@homaroma/types'
import { API_BASE } from '../../../lib/api'
+1 -1
View File
@@ -1,6 +1,6 @@
import Link from 'next/link'
import ProductCard from '../components/ProductCard'
import { getCategoryImage, type Category, type Product, type Hero } from '@irelax/types'
import { getCategoryImage, type Category, type Product, type Hero } from '@homaroma/types'
import { API_BASE } from '../lib/api'
// Cache settings for Next.js fetch
+1 -1
View File
@@ -1,7 +1,7 @@
import Link from 'next/link'
import { notFound } from 'next/navigation'
import type { Metadata } from 'next'
import { getCategoryImage, formatPrice, type Product } from '@irelax/types'
import { getCategoryImage, formatPrice, type Product } from '@homaroma/types'
import AddToCartSection from '../../../components/AddToCartSection'
import ProductCard from '../../../components/ProductCard'
+1 -1
View File
@@ -1,5 +1,5 @@
import Link from 'next/link'
import type { Article } from '@irelax/types'
import type { Article } from '@homaroma/types'
import { API_BASE } from '../../lib/api'
export const metadata = {
+1 -1
View File
@@ -3,7 +3,7 @@ import { useState, useEffect, useRef, Suspense } from 'react'
import { useSearchParams, useRouter } from 'next/navigation'
import Link from 'next/link'
import ProductCard from '../../components/ProductCard'
import { type Product } from '@irelax/types'
import { type Product } from '@homaroma/types'
import { API_BASE } from '../../lib/api'
function SearchResults() {
+1 -1
View File
@@ -2,7 +2,7 @@
import { useState, useEffect, useRef } from 'react'
import Link from 'next/link'
import ProductCard from '../../components/ProductCard'
import { type Category, type Product } from '@irelax/types'
import { type Category, type Product } from '@homaroma/types'
import { API_BASE } from '../../lib/api'
+1 -1
View File
@@ -1,7 +1,7 @@
"use client";
import { useState } from 'react'
import Link from 'next/link'
import { getCategoryImage, formatPrice, type Product } from '@irelax/types'
import { getCategoryImage, formatPrice, type Product } from '@homaroma/types'
import { useCartStore } from '../store/cartStore'
interface Props {
+1 -1
View File
@@ -2,7 +2,7 @@
import { X, ShoppingBag, Plus, Minus, Trash2 } from 'lucide-react'
import Link from 'next/link'
import { useCartStore } from '../store/cartStore'
import { formatPrice } from '@irelax/types'
import { formatPrice } from '@homaroma/types'
import { useTranslation } from 'react-i18next'
export default function CartDrawer() {
+1 -1
View File
@@ -1,6 +1,6 @@
"use client";
import Link from 'next/link'
import type { Category } from '@irelax/types'
import type { Category } from '@homaroma/types'
import { useTranslation } from 'react-i18next'
interface FooterProps {
+1 -1
View File
@@ -2,7 +2,7 @@
import Link from 'next/link'
import { useRouter, usePathname } from 'next/navigation'
import { useState, useEffect } from 'react'
import type { Category } from '@irelax/types'
import type { Category } from '@homaroma/types'
import { ShoppingBag, MapPin } from 'lucide-react'
import { useCartStore } from '../store/cartStore'
import { useTranslation } from 'react-i18next'
+2 -2
View File
@@ -1,6 +1,6 @@
import Link from 'next/link'
import type { Product } from '@irelax/types'
import { getCategoryImage, formatPrice } from '@irelax/types'
import type { Product } from '@homaroma/types'
import { getCategoryImage, formatPrice } from '@homaroma/types'
interface ProductCardProps {
product: Product
+1 -1
View File
@@ -1,6 +1,6 @@
import { create } from 'zustand';
import { persist } from 'zustand/middleware';
import type { CartItem } from '@irelax/types';
import type { CartItem } from '@homaroma/types';
interface CartState {
items: CartItem[];
+1
View File
@@ -13,6 +13,7 @@
"@homaroma/types": "workspace:*",
"@line/liff": "^2.28.0",
"i18next": "^26.0.4",
"lucide-react": "^1.17.0",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"react-i18next": "^17.0.2",
+1 -1
View File
@@ -2,7 +2,7 @@ import React from 'react'
import { X, ShoppingBag, Plus, Minus, Trash2, Tag, ArrowRight } from 'lucide-react'
import { Link } from 'react-router-dom'
import { useCartStore } from '../store/cartStore'
import { formatPrice } from '@irelax/types'
import { formatPrice } from '@homaroma/types'
import { useTranslation } from 'react-i18next'
import { API_BASE } from '../types'
+1 -1
View File
@@ -1,6 +1,6 @@
import { create } from 'zustand';
import { persist } from 'zustand/middleware';
import type { CartItem } from '@irelax/types';
import type { CartItem } from '@homaroma/types';
interface CartState {
items: CartItem[];
+1 -1
View File
@@ -1 +1 @@
export * from '@irelax/types'
export * from '@homaroma/types'