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