Mass replace irelax with homaroma across project
This commit is contained in:
1 parent
5e6cb851de
commit
d9c79aa900
57 files changed
+117
-117
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { Navigate, Outlet } from 'react-router-dom'
|
||||
|
||||
export default function ProtectedRoute() {
|
||||
const token = localStorage.getItem('irelax_admin_token')
|
||||
const token = localStorage.getItem('homaroma_admin_token')
|
||||
|
||||
if (!token) {
|
||||
// If no token, redirect to login page
|
||||
|
||||
@@ -48,8 +48,8 @@ export default function Sidebar() {
|
||||
const navigate = useNavigate()
|
||||
|
||||
const handleLogout = () => {
|
||||
localStorage.removeItem('irelax_admin_token')
|
||||
localStorage.removeItem('irelax_admin_user')
|
||||
localStorage.removeItem('homaroma_admin_token')
|
||||
localStorage.removeItem('homaroma_admin_user')
|
||||
navigate('/login')
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ export default function Sidebar() {
|
||||
{/* Brand */}
|
||||
<div className="p-8">
|
||||
<div className="text-xl font-bold tracking-widest text-white uppercase italic">
|
||||
iRelax <span className="text-cyan-glow text-xs not-italic font-light opacity-60">Admin</span>
|
||||
HomAroma <span className="text-cyan-glow text-xs not-italic font-light opacity-60">Admin</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
@theme {
|
||||
/* iRelax Admin - Professional Dark Palette */
|
||||
/* HomAroma Admin - Professional Dark Palette */
|
||||
--color-night-950: #050608;
|
||||
--color-night-900: #0B0C10;
|
||||
--color-night-800: #1F2833;
|
||||
|
||||
@@ -52,7 +52,7 @@ export default function DashboardPage() {
|
||||
<div className="flex justify-between items-end">
|
||||
<div className="space-y-1">
|
||||
<h1 className="text-3xl font-bold">System Overview</h1>
|
||||
<p className="text-slate-500 text-sm">Real-time stats from the iRelax platform.</p>
|
||||
<p className="text-slate-500 text-sm">Real-time stats from the HomAroma platform.</p>
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<p className="text-xs uppercase tracking-widest text-slate-500">Last updated</p>
|
||||
|
||||
@@ -45,7 +45,7 @@ const PRESETS: { key: Preset; label: string }[] = [
|
||||
];
|
||||
|
||||
function authHeaders() {
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('irelax_admin_token')}` };
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('homaroma_admin_token')}` };
|
||||
}
|
||||
function fmt(val: number, dec = 0) {
|
||||
return new Intl.NumberFormat('th-TH', { minimumFractionDigits: dec, maximumFractionDigits: dec }).format(val);
|
||||
|
||||
@@ -16,7 +16,7 @@ const API_URL = (import.meta.env.VITE_API_URL || 'http://localhost:3000').replac
|
||||
const COLORS = ['#3b82f6', '#8b5cf6', '#ec4899', '#eab308', '#f97316', '#22d3ee', '#10b981'];
|
||||
|
||||
function authHeaders() {
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('irelax_admin_token')}` };
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('homaroma_admin_token')}` };
|
||||
}
|
||||
|
||||
function fmt(val: number, decimals = 0) {
|
||||
|
||||
@@ -8,7 +8,7 @@ export const LAZADA_SHOPS = [
|
||||
{ id: 'hom-aroma', label: 'Hom Aroma', color: 'text-blue-500', activeBg: 'bg-blue-500/15', activeBorder: 'border-blue-500/40' },
|
||||
{ id: 'shop-01', label: 'Annlina', color: 'text-indigo-400', activeBg: 'bg-indigo-500/15', activeBorder: 'border-indigo-500/40' },
|
||||
{ id: 'pakasai', label: 'Pakasai', color: 'text-pink-400', activeBg: 'bg-pink-500/15', activeBorder: 'border-pink-500/40' },
|
||||
{ id: 'irelaxshop', label: 'Relax', color: 'text-yellow-400', activeBg: 'bg-yellow-500/15', activeBorder: 'border-yellow-500/40' },
|
||||
{ id: 'homaromashop', label: 'Relax', color: 'text-yellow-400', activeBg: 'bg-yellow-500/15', activeBorder: 'border-yellow-500/40' },
|
||||
{ id: 'conner', label: 'Conner', color: 'text-white', activeBg: 'bg-white/15', activeBorder: 'border-white/40' },
|
||||
{ id: 'december', label: 'December', color: 'text-white', activeBg: 'bg-white/15', activeBorder: 'border-white/40' },
|
||||
|
||||
@@ -18,7 +18,7 @@ export const LAZADA_SHOPS = [
|
||||
function getShop(id: string) { return LAZADA_SHOPS.find(s => s.id === id) || LAZADA_SHOPS[0]; }
|
||||
|
||||
function authHeaders() {
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('irelax_admin_token')}` };
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('homaroma_admin_token')}` };
|
||||
}
|
||||
|
||||
// ── Summary Cards ─────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -17,7 +17,7 @@ const SHOP_HEX: Record<string, string> = {
|
||||
'hom-aroma': '#3b82f6', // blue-500
|
||||
'shop-01': '#818cf8', // indigo-400
|
||||
'pakasai': '#f472b6', // pink-400
|
||||
'irelaxshop':'#facc15', // yellow-400
|
||||
'homaromashop':'#facc15', // yellow-400
|
||||
'conner': '#94a3b8', // slate-400
|
||||
'december': '#cbd5e1', // slate-300
|
||||
};
|
||||
@@ -59,7 +59,7 @@ const PRESETS: { key: Preset; label: string }[] = [
|
||||
];
|
||||
|
||||
function authHeaders() {
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('irelax_admin_token')}` };
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('homaroma_admin_token')}` };
|
||||
}
|
||||
function fmt(val: number, dec = 0) {
|
||||
return new Intl.NumberFormat('th-TH', { minimumFractionDigits: dec, maximumFractionDigits: dec }).format(val);
|
||||
|
||||
@@ -29,8 +29,8 @@ export default function LoginPage() {
|
||||
}
|
||||
|
||||
// Store token
|
||||
localStorage.setItem('irelax_admin_token', data.token)
|
||||
localStorage.setItem('irelax_admin_user', JSON.stringify(data.user))
|
||||
localStorage.setItem('homaroma_admin_token', data.token)
|
||||
localStorage.setItem('homaroma_admin_user', JSON.stringify(data.user))
|
||||
|
||||
// Redirect to dashboard
|
||||
navigate('/')
|
||||
@@ -53,7 +53,7 @@ export default function LoginPage() {
|
||||
Authorized Access Only
|
||||
</div>
|
||||
<h1 className="text-4xl font-bold tracking-tighter text-white">
|
||||
iRelax <span className="text-cyan-glow">Admin</span>
|
||||
HomAroma <span className="text-cyan-glow">Admin</span>
|
||||
</h1>
|
||||
<p className="text-slate-500 text-sm">Welcome back to the sensory command center.</p>
|
||||
</div>
|
||||
@@ -115,7 +115,7 @@ export default function LoginPage() {
|
||||
</form>
|
||||
|
||||
<p className="text-center text-[10px] text-slate-600 uppercase tracking-widest">
|
||||
© 2026 iRelax Aroma & Essential Oils
|
||||
© 2026 HomAroma & Essential Oils
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@ const API_URL = (import.meta.env.VITE_API_URL || 'http://localhost:3000').replac
|
||||
const COLORS = ['#22d3ee', '#4ade80', '#f97316', '#818cf8', '#f472b6', '#facc15', '#fb923c'];
|
||||
|
||||
function authHeaders() {
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('irelax_admin_token')}` };
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('homaroma_admin_token')}` };
|
||||
}
|
||||
|
||||
function fmt(val: number, decimals = 0) {
|
||||
|
||||
@@ -21,7 +21,7 @@ const API_URL = (import.meta.env.VITE_API_URL || 'http://localhost:3000').replac
|
||||
function authHeaders() {
|
||||
return {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${localStorage.getItem('irelax_admin_token')}`,
|
||||
Authorization: `Bearer ${localStorage.getItem('homaroma_admin_token')}`,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ const PRESETS: { key: Preset; label: string }[] = [
|
||||
];
|
||||
|
||||
function authHeaders() {
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('irelax_admin_token')}` };
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('homaroma_admin_token')}` };
|
||||
}
|
||||
function fmt(val: number, dec = 0) {
|
||||
return new Intl.NumberFormat('th-TH', { minimumFractionDigits: dec, maximumFractionDigits: dec }).format(val);
|
||||
|
||||
@@ -8,7 +8,7 @@ const API_URL = (import.meta.env.VITE_API_URL || 'http://localhost:3000').replac
|
||||
// ── Shop Config ───────────────────────────────────────────────────────────────
|
||||
export const SHOPEE_SHOPS = [
|
||||
{ id: 'hom-aroma', label: 'Hom Aroma', color: 'text-orange-400', bg: 'bg-orange-500/15', border: 'border-orange-500/20', activeBg: 'bg-orange-500/20', activeBorder: 'border-orange-500/30' },
|
||||
{ id: 'shop-01', label: 'iRelax', color: 'text-violet-400', bg: 'bg-violet-500/15', border: 'border-violet-500/20', activeBg: 'bg-violet-500/20', activeBorder: 'border-violet-500/30' },
|
||||
{ id: 'shop-01', label: 'HomAroma', color: 'text-violet-400', bg: 'bg-violet-500/15', border: 'border-violet-500/20', activeBg: 'bg-violet-500/20', activeBorder: 'border-violet-500/30' },
|
||||
{ id: 'shop-02', label: 'Shop-02', color: 'text-sky-400', bg: 'bg-sky-500/15', border: 'border-sky-500/20', activeBg: 'bg-sky-500/20', activeBorder: 'border-sky-500/30' },
|
||||
];
|
||||
|
||||
@@ -17,7 +17,7 @@ function getShop(id: string) { return SHOPEE_SHOPS.find(s => s.id === id) ?? SHO
|
||||
function authHeaders() {
|
||||
return {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${localStorage.getItem('irelax_admin_token')}`,
|
||||
Authorization: `Bearer ${localStorage.getItem('homaroma_admin_token')}`,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ function formatCurrency(val: number) {
|
||||
}
|
||||
|
||||
function authHeaders() {
|
||||
return { 'Content-Type': 'application/json', 'Authorization': `Bearer ${localStorage.getItem('irelax_admin_token')}` };
|
||||
return { 'Content-Type': 'application/json', 'Authorization': `Bearer ${localStorage.getItem('homaroma_admin_token')}` };
|
||||
}
|
||||
|
||||
const COLORS = ['#22d3ee', '#818cf8', '#c084fc', '#f472b6', '#fb923c', '#facc15', '#4ade80'];
|
||||
|
||||
@@ -16,7 +16,7 @@ const API_URL = (import.meta.env.VITE_API_URL || 'http://localhost:3000').replac
|
||||
const COLORS = ['#22d3ee', '#4ade80', '#f97316', '#818cf8', '#f472b6', '#facc15', '#fb923c'];
|
||||
|
||||
function authHeaders() {
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('irelax_admin_token')}` };
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('homaroma_admin_token')}` };
|
||||
}
|
||||
|
||||
function fmt(val: number, decimals = 0) {
|
||||
|
||||
@@ -17,7 +17,7 @@ export const TIKTOK_SHOPS = [
|
||||
function getShop(id: string) { return TIKTOK_SHOPS.find(s => s.id === id) ?? TIKTOK_SHOPS[0]; }
|
||||
|
||||
function authHeaders() {
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('irelax_admin_token')}` };
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('homaroma_admin_token')}` };
|
||||
}
|
||||
function fmt(val: number) {
|
||||
return new Intl.NumberFormat('th-TH', { minimumFractionDigits: 2, maximumFractionDigits: 2 }).format(val);
|
||||
|
||||
@@ -55,7 +55,7 @@ const PRESETS: { key: Preset; label: string }[] = [
|
||||
];
|
||||
|
||||
function authHeaders() {
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('irelax_admin_token')}` };
|
||||
return { 'Content-Type': 'application/json', Authorization: `Bearer ${localStorage.getItem('homaroma_admin_token')}` };
|
||||
}
|
||||
function fmt(val: number, dec = 0) {
|
||||
return new Intl.NumberFormat('th-TH', { minimumFractionDigits: dec, maximumFractionDigits: dec }).format(val);
|
||||
|
||||
@@ -12,7 +12,7 @@ function formatCurrency(val: number) {
|
||||
}
|
||||
|
||||
function authHeaders() {
|
||||
return { 'Content-Type': 'application/json', 'Authorization': `Bearer ${localStorage.getItem('irelax_admin_token')}` };
|
||||
return { 'Content-Type': 'application/json', 'Authorization': `Bearer ${localStorage.getItem('homaroma_admin_token')}` };
|
||||
}
|
||||
|
||||
// ─── TSV parser: handles quoted fields (embedded tabs/newlines) + skip rows ────
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "backend",
|
||||
"version": "1.0.0",
|
||||
"description": "iRelax API — Elysia.js + Prisma 7",
|
||||
"description": "HomAroma API — Elysia.js + Prisma 7",
|
||||
"module": "src/index.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
@@ -118,7 +118,7 @@ model StoreSettings {
|
||||
id Int @id @default(1)
|
||||
shippingFee Float @default(35)
|
||||
bankName String @default("KASIKORNBANK (KBANK)")
|
||||
bankAccountName String @default("iRelax Aroma Co., Ltd.")
|
||||
bankAccountName String @default("HomAroma Co., Ltd.")
|
||||
bankAccountNumber String @default("012-3-45678-9")
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ async function main() {
|
||||
}
|
||||
|
||||
// 0. Seed Admin User
|
||||
const adminPassword = await bcrypt.hash('irelax123', 10);
|
||||
const adminPassword = await bcrypt.hash('homaroma123', 10);
|
||||
await prisma.user.upsert({
|
||||
where: { username: 'admin' },
|
||||
update: { password: adminPassword },
|
||||
@@ -96,7 +96,7 @@ async function main() {
|
||||
role: 'ADMIN'
|
||||
}
|
||||
});
|
||||
process.stdout.write('✅ Seeded Admin User (admin / irelax123).\n');
|
||||
process.stdout.write('✅ Seeded Admin User (admin / homaroma123).\n');
|
||||
|
||||
// 1. Seed Scents & Categories
|
||||
const scents = [];
|
||||
|
||||
@@ -7,7 +7,7 @@ export const authRoute = new Elysia({ prefix: "/auth" })
|
||||
.use(
|
||||
jwt({
|
||||
name: "jwt",
|
||||
secret: process.env.JWT_SECRET || "irelax_secret_2026_scent",
|
||||
secret: process.env.JWT_SECRET || "homaroma_secret_2026_scent",
|
||||
exp: "24h",
|
||||
})
|
||||
)
|
||||
|
||||
@@ -126,7 +126,7 @@ function CartDrawerFooter({ subtotal, onClose }: { subtotal: number; onClose: ()
|
||||
const [couponValid, setCouponValid] = React.useState<boolean>(false)
|
||||
|
||||
React.useEffect(() => {
|
||||
const code = localStorage.getItem('irelax_active_coupon')
|
||||
const code = localStorage.getItem('homaroma_active_coupon')
|
||||
setSavedCoupon(code)
|
||||
if (code && subtotal > 0) {
|
||||
fetch(`${API_BASE}/coupons/validate`, {
|
||||
@@ -149,7 +149,7 @@ function CartDrawerFooter({ subtotal, onClose }: { subtotal: number; onClose: ()
|
||||
}, [subtotal])
|
||||
|
||||
const removeCoupon = () => {
|
||||
localStorage.removeItem('irelax_active_coupon')
|
||||
localStorage.removeItem('homaroma_active_coupon')
|
||||
setSavedCoupon(null)
|
||||
setDiscountAmount(0)
|
||||
setIsFreeShipping(false)
|
||||
|
||||
@@ -13,7 +13,7 @@ export default function Footer({ categories = [] }: FooterProps) {
|
||||
<div className="max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-4 gap-12">
|
||||
<div className="space-y-6">
|
||||
<div className="text-2xl font-bold tracking-widest">
|
||||
iRelax <span className="text-cyan-glow text-sm font-light italic">Essential</span>
|
||||
HomAroma <span className="text-cyan-glow text-sm font-light italic">Essential</span>
|
||||
</div>
|
||||
<p className="text-slate-500 text-sm leading-relaxed">
|
||||
{t('footer.catchphrase')}
|
||||
@@ -64,7 +64,7 @@ export default function Footer({ categories = [] }: FooterProps) {
|
||||
</button>
|
||||
</div>
|
||||
<p className="text-[10px] text-slate-600 uppercase tracking-widest">
|
||||
© {new Date().getFullYear()} iRelax Essential. {t('footer.rights')}
|
||||
© {new Date().getFullYear()} HomAroma. {t('footer.rights')}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@ export default function Navbar({ categories = [] }: NavbarProps) {
|
||||
const toggleLanguage = () => {
|
||||
const newLang = i18n.language.startsWith('en') ? 'th' : 'en'
|
||||
i18n.changeLanguage(newLang)
|
||||
localStorage.setItem('irelax_lang', newLang)
|
||||
localStorage.setItem('homaroma_lang', newLang)
|
||||
}
|
||||
|
||||
// Detect scroll for navbar bg change
|
||||
@@ -36,7 +36,7 @@ export default function Navbar({ categories = [] }: NavbarProps) {
|
||||
window.addEventListener('scroll', onScroll, { passive: true })
|
||||
|
||||
// Check local orders periodically (or just on mount)
|
||||
const stored = localStorage.getItem('irelax_local_orders')
|
||||
const stored = localStorage.getItem('homaroma_local_orders')
|
||||
if (stored) {
|
||||
try { setLocalOrdersCount(JSON.parse(stored).length) } catch (e) {}
|
||||
}
|
||||
@@ -75,7 +75,7 @@ export default function Navbar({ categories = [] }: NavbarProps) {
|
||||
>
|
||||
{/* Logo */}
|
||||
<Link to="/" onClick={() => setMobileOpen(false)} className="text-xl md:text-2xl font-bold tracking-widest text-white uppercase italic shrink-0">
|
||||
iRelax <span className="hidden md:inline text-cyan-glow text-xs md:text-sm not-italic font-light opacity-60 ml-1">Essential</span>
|
||||
HomAroma <span className="hidden md:inline text-cyan-glow text-xs md:text-sm not-italic font-light opacity-60 ml-1">Essential</span>
|
||||
</Link>
|
||||
|
||||
{/* ── DESKTOP NAV ── */}
|
||||
|
||||
@@ -5,7 +5,7 @@ import enTranslation from './locales/en/translation.json'
|
||||
import thTranslation from './locales/th/translation.json'
|
||||
|
||||
// Retrieve default lang from localStorage if set
|
||||
const savedLang = localStorage.getItem('irelax_lang') || 'th'
|
||||
const savedLang = localStorage.getItem('homaroma_lang') || 'th'
|
||||
|
||||
i18n
|
||||
.use(initReactI18next)
|
||||
|
||||
@@ -52,7 +52,7 @@ export default function AboutPage() {
|
||||
Born from a passion for <span className="text-transparent bg-clip-text bg-gradient-to-r from-cyan-glow to-night-700 italic font-serif">stillness</span>
|
||||
</h1>
|
||||
<p className="text-slate-300 text-lg leading-relaxed">
|
||||
iRelax began in 2019 as a one-person studio in Bangkok, crafting small batches of botanical aroma blends for friends and family. What started as a personal journey toward calm became a philosophy — that our environment shapes how we feel, think, and rest.
|
||||
HomAroma began in 2019 as a one-person studio in Bangkok, crafting small batches of botanical aroma blends for friends and family. What started as a personal journey toward calm became a philosophy — that our environment shapes how we feel, think, and rest.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
@@ -81,7 +81,7 @@ export default function AboutPage() {
|
||||
We believe that scent is the fastest pathway to emotional transformation. A single breath of the right blend can dissolve anxiety, sharpen focus, or unlock creativity. Our mission is to make that transformation accessible — through products that are as beautiful as they are effective.
|
||||
</p>
|
||||
<p className="text-slate-400 leading-relaxed text-sm">
|
||||
Every iRelax product is designed with intention: the glass bottles are reusable, the packaging is recycled, and the formulas are written to be understood by anyone — not hidden behind chemical jargon.
|
||||
Every HomAroma product is designed with intention: the glass bottles are reusable, the packaging is recycled, and the formulas are written to be understood by anyone — not hidden behind chemical jargon.
|
||||
</p>
|
||||
</div>
|
||||
<div className="relative h-80 rounded-2xl overflow-hidden glass border border-white/5">
|
||||
@@ -89,7 +89,7 @@ export default function AboutPage() {
|
||||
<div className="absolute inset-0 flex items-center justify-center">
|
||||
<div className="text-center space-y-3">
|
||||
<div className="text-7xl">🌿</div>
|
||||
<p className="text-white/30 text-sm uppercase tracking-widest">iRelax Studio, Bangkok</p>
|
||||
<p className="text-white/30 text-sm uppercase tracking-widest">HomAroma Studio, Bangkok</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,7 @@ export default function CheckoutPage() {
|
||||
.then(setCategories)
|
||||
|
||||
// Check if there's an active coupon saved in localStorage
|
||||
const savedCoupon = localStorage.getItem('irelax_active_coupon')
|
||||
const savedCoupon = localStorage.getItem('homaroma_active_coupon')
|
||||
if (savedCoupon) {
|
||||
setCouponCode(savedCoupon)
|
||||
// We will trigger handleApplyCoupon but we need to wait for items/subtotal to be ready.
|
||||
@@ -80,7 +80,7 @@ export default function CheckoutPage() {
|
||||
|
||||
// Auto-apply saved coupon if subtotal is ready
|
||||
useEffect(() => {
|
||||
const savedCoupon = localStorage.getItem('irelax_active_coupon')
|
||||
const savedCoupon = localStorage.getItem('homaroma_active_coupon')
|
||||
if (savedCoupon && subtotal > 0 && !appliedCoupon && !couponError && !couponLoading) {
|
||||
setCouponCode(savedCoupon)
|
||||
// trigger fetch to validate
|
||||
@@ -96,7 +96,7 @@ export default function CheckoutPage() {
|
||||
setDiscountAmount(data.discountAmount)
|
||||
setIsFreeShipping(data.isFreeShipping)
|
||||
} else {
|
||||
localStorage.removeItem('irelax_active_coupon') // Remove invalid
|
||||
localStorage.removeItem('homaroma_active_coupon') // Remove invalid
|
||||
}
|
||||
})
|
||||
.catch(console.error)
|
||||
@@ -160,7 +160,7 @@ export default function CheckoutPage() {
|
||||
setDiscountAmount(0)
|
||||
setIsFreeShipping(false)
|
||||
setCouponError('')
|
||||
localStorage.removeItem('irelax_active_coupon')
|
||||
localStorage.removeItem('homaroma_active_coupon')
|
||||
}
|
||||
|
||||
const handleSubmit = async (e: React.FormEvent) => {
|
||||
@@ -200,10 +200,10 @@ export default function CheckoutPage() {
|
||||
if (res.ok) {
|
||||
clearCart()
|
||||
|
||||
const existingStr = localStorage.getItem('irelax_local_orders')
|
||||
const existingStr = localStorage.getItem('homaroma_local_orders')
|
||||
const existing = existingStr ? JSON.parse(existingStr) : []
|
||||
if (!existing.includes(responseData.id)) {
|
||||
localStorage.setItem('irelax_local_orders', JSON.stringify([responseData.id, ...existing]))
|
||||
localStorage.setItem('homaroma_local_orders', JSON.stringify([responseData.id, ...existing]))
|
||||
}
|
||||
|
||||
navigate(`/order/${responseData.id}`)
|
||||
|
||||
@@ -50,9 +50,9 @@ export default function ContactPage() {
|
||||
<h2 className="font-bold text-xl mb-6">Reach Us Directly</h2>
|
||||
<div className="space-y-5">
|
||||
{[
|
||||
{ icon: '📧', label: 'Email', value: 'hello@irelax.co.th', href: 'mailto:hello@irelax.co.th' },
|
||||
{ icon: '📱', label: 'LINE Official', value: '@irelaxessential', href: '#' },
|
||||
{ icon: '📸', label: 'Instagram', value: '@irelax.essential', href: '#' },
|
||||
{ icon: '📧', label: 'Email', value: 'hello@homaroma.shop', href: 'mailto:hello@homaroma.shop' },
|
||||
{ icon: '📱', label: 'LINE Official', value: '@homaroma', href: '#' },
|
||||
{ icon: '📸', label: 'Instagram', value: '@homaroma', href: '#' },
|
||||
{ icon: '📍', label: 'Studio', value: 'Bangkok, Thailand', href: '#' },
|
||||
].map(item => (
|
||||
<a key={item.label} href={item.href} className="flex items-start gap-4 group">
|
||||
|
||||
@@ -56,7 +56,7 @@ export default function CouponsPage() {
|
||||
}
|
||||
|
||||
const handleUseNow = (code: string) => {
|
||||
localStorage.setItem('irelax_active_coupon', code)
|
||||
localStorage.setItem('homaroma_active_coupon', code)
|
||||
navigate('/shop')
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ const FAQS = [
|
||||
category: 'Products',
|
||||
icon: '🌿',
|
||||
items: [
|
||||
{ q: 'What are the ingredients in your aroma products?', a: 'All iRelax products are crafted from 100% natural botanical extracts, pure essential oils, and pharmaceutical-grade carrier bases. We never use synthetic fragrances, parabens, or harmful chemicals. Each product label lists full ingredient transparency.' },
|
||||
{ q: 'What are the ingredients in your aroma products?', a: 'All HomAroma products are crafted from 100% natural botanical extracts, pure essential oils, and pharmaceutical-grade carrier bases. We never use synthetic fragrances, parabens, or harmful chemicals. Each product label lists full ingredient transparency.' },
|
||||
{ q: 'How long does each product last?', a: 'Our Reed Diffusers last 4–8 weeks depending on room size and airflow. Aroma Oils (30ml) last approximately 3–4 months with normal use. Room Sprays (100ml) provide 60–80 uses. Car Diffusers cartridges last up to 45 days.' },
|
||||
{ q: 'Are your products suitable for sensitive skin or allergies?', a: 'We recommend patch testing before topical use. Our Aroma Oils are formulated for diffuser use primarily. If you have known fragrance allergies, consult our scent guide or contact us with your specific concerns — we are happy to help identify suitable options.' },
|
||||
{ q: 'What is the difference between Aroma Oil and Oil Ozone?', a: 'Aroma Oils are pure essential oil blends designed for aromatherapy diffusers and therapeutic use. Oil Ozone is our premium line featuring ozone-infused botanical extracts — designed for air purification and deeper space transformation, ideal for large rooms and commercial spaces.' },
|
||||
@@ -29,7 +29,7 @@ const FAQS = [
|
||||
items: [
|
||||
{ q: 'How long does shipping take?', a: 'Standard delivery within Bangkok takes 1–2 business days. Provincial orders take 2–4 business days. Express same-day delivery is available in Bangkok for orders placed before 12:00 PM.' },
|
||||
{ q: 'Do you ship internationally?', a: 'Currently we ship within Thailand only. International shipping is planned for late 2025. Sign up for our newsletter to be notified when we expand to your region.' },
|
||||
{ q: 'What is your return policy?', a: 'We accept returns within 14 days of purchase for unopened, undamaged products in original packaging. For defective or damaged products, we offer full replacement at no cost. Contact us at hello@irelax.co.th with your order number.' },
|
||||
{ q: 'What is your return policy?', a: 'We accept returns within 14 days of purchase for unopened, undamaged products in original packaging. For defective or damaged products, we offer full replacement at no cost. Contact us at hello@homaroma.shop with your order number.' },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -64,7 +64,7 @@ export default function FaqPage() {
|
||||
<p className="text-cyan-glow uppercase tracking-[0.4em] text-xs font-semibold opacity-70">Support</p>
|
||||
<h1 className="text-5xl font-bold">Frequently Asked Questions</h1>
|
||||
<p className="text-slate-400 max-w-lg mx-auto">
|
||||
Everything you need to know about iRelax products, shipping, and care.
|
||||
Everything you need to know about HomAroma products, shipping, and care.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ export default function ShopPage() {
|
||||
const params = new URLSearchParams(location.search)
|
||||
const coupon = params.get('coupon')
|
||||
if (coupon) {
|
||||
localStorage.setItem('irelax_active_coupon', coupon)
|
||||
localStorage.setItem('homaroma_active_coupon', coupon)
|
||||
// Optionally clean URL
|
||||
window.history.replaceState({}, document.title, window.location.pathname)
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export default function TrackOrderPage() {
|
||||
.catch(console.error)
|
||||
|
||||
// Load local orders
|
||||
const storedStr = localStorage.getItem('irelax_local_orders')
|
||||
const storedStr = localStorage.getItem('homaroma_local_orders')
|
||||
if (storedStr) {
|
||||
setLocalOrders(JSON.parse(storedStr))
|
||||
}
|
||||
@@ -49,7 +49,7 @@ export default function TrackOrderPage() {
|
||||
if (!localOrders.includes(data.orderId)) {
|
||||
const newOrders = [data.orderId, ...localOrders]
|
||||
setLocalOrders(newOrders)
|
||||
localStorage.setItem('irelax_local_orders', JSON.stringify(newOrders))
|
||||
localStorage.setItem('homaroma_local_orders', JSON.stringify(newOrders))
|
||||
}
|
||||
navigate(`/order/${data.orderId}`)
|
||||
} else {
|
||||
|
||||
@@ -30,7 +30,7 @@ export const useAuthStore = create<AuthState>()(
|
||||
logout: () => set({ token: null, customer: null }),
|
||||
}),
|
||||
{
|
||||
name: "irelax-auth-storage",
|
||||
name: "homaroma-auth-storage",
|
||||
partialize: (state) => ({ token: state.token, customer: state.customer }), // don't persist isLiffInitialized
|
||||
}
|
||||
)
|
||||
|
||||
@@ -71,7 +71,7 @@ export const useCartStore = create<CartState>()(
|
||||
}
|
||||
}),
|
||||
{
|
||||
name: 'irelax-cart-storage',
|
||||
name: 'homaroma-cart-storage',
|
||||
partialize: (state) => ({ items: state.items }), // Only persist items, not UI state
|
||||
}
|
||||
)
|
||||
|
||||
@@ -26,8 +26,8 @@ const STATS = [
|
||||
]
|
||||
|
||||
export const metadata = {
|
||||
title: 'About Us | iRelax Aroma',
|
||||
description: 'Born from a passion for stillness. iRelax began in 2019 as a Bangkok studio crafting botanical aroma blends.',
|
||||
title: 'About Us | HomAroma',
|
||||
description: 'Born from a passion for stillness. HomAroma began in 2019 as a Bangkok studio crafting botanical aroma blends.',
|
||||
}
|
||||
|
||||
export default function AboutPage() {
|
||||
@@ -46,7 +46,7 @@ export default function AboutPage() {
|
||||
Born from a passion for <span className="text-transparent bg-clip-text bg-gradient-to-r from-cyan-glow to-night-700 italic font-serif">stillness</span>
|
||||
</h1>
|
||||
<p className="text-slate-300 text-lg leading-relaxed">
|
||||
iRelax began in 2019 as a one-person studio in Bangkok, crafting small batches of botanical aroma blends for friends and family. What started as a personal journey toward calm became a philosophy — that our environment shapes how we feel, think, and rest.
|
||||
HomAroma began in 2019 as a one-person studio in Bangkok, crafting small batches of botanical aroma blends for friends and family. What started as a personal journey toward calm became a philosophy — that our environment shapes how we feel, think, and rest.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
@@ -73,7 +73,7 @@ export default function AboutPage() {
|
||||
We believe that scent is the fastest pathway to emotional transformation. A single breath of the right blend can dissolve anxiety, sharpen focus, or unlock creativity. Our mission is to make that transformation accessible — through products that are as beautiful as they are effective.
|
||||
</p>
|
||||
<p className="text-slate-400 leading-relaxed text-sm">
|
||||
Every iRelax product is designed with intention: the glass bottles are reusable, the packaging is recycled, and the formulas are written to be understood by anyone — not hidden behind chemical jargon.
|
||||
Every HomAroma product is designed with intention: the glass bottles are reusable, the packaging is recycled, and the formulas are written to be understood by anyone — not hidden behind chemical jargon.
|
||||
</p>
|
||||
</div>
|
||||
<div className="relative h-80 rounded-2xl overflow-hidden glass border border-white/5">
|
||||
@@ -81,7 +81,7 @@ export default function AboutPage() {
|
||||
<div className="absolute inset-0 flex items-center justify-center">
|
||||
<div className="text-center space-y-3">
|
||||
<div className="text-7xl">🌿</div>
|
||||
<p className="text-white/30 text-sm uppercase tracking-widest">iRelax Studio, Bangkok</p>
|
||||
<p className="text-white/30 text-sm uppercase tracking-widest">HomAroma Studio, Bangkok</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,9 +16,9 @@ async function getArticle(slug: string): Promise<Article | null> {
|
||||
export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }): Promise<Metadata> {
|
||||
const { slug } = await params
|
||||
const article = await getArticle(slug)
|
||||
if (!article) return { title: 'Article Not Found | iRelax' }
|
||||
if (!article) return { title: 'Article Not Found | HomAroma' }
|
||||
return {
|
||||
title: `${article.title} | iRelax Scent Guide`,
|
||||
title: `${article.title} | HomAroma Scent Guide`,
|
||||
description: article.content.replace(/<[^>]+>/g, '').slice(0, 160),
|
||||
openGraph: {
|
||||
title: article.title,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { Metadata } from 'next'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Contact Us | iRelax Aroma',
|
||||
description: 'Get in touch with iRelax. We respond to all inquiries within 2 hours.',
|
||||
title: 'Contact Us | HomAroma',
|
||||
description: 'Get in touch with HomAroma. We respond to all inquiries within 2 hours.',
|
||||
}
|
||||
|
||||
export default function ContactLayout({ children }: { children: React.ReactNode }) {
|
||||
|
||||
@@ -39,9 +39,9 @@ export default function ContactPage() {
|
||||
<h2 className="font-bold text-xl mb-6">Reach Us Directly</h2>
|
||||
<div className="space-y-5">
|
||||
{[
|
||||
{ icon: '📧', label: 'Email', value: 'hello@irelax.co.th', href: 'mailto:hello@irelax.co.th' },
|
||||
{ icon: '📱', label: 'LINE Official', value: '@irelaxessential', href: '#' },
|
||||
{ icon: '📸', label: 'Instagram', value: '@irelax.essential', href: '#' },
|
||||
{ icon: '📧', label: 'Email', value: 'hello@homaroma.shop', href: 'mailto:hello@homaroma.shop' },
|
||||
{ icon: '📱', label: 'LINE Official', value: '@homaroma', href: '#' },
|
||||
{ icon: '📸', label: 'Instagram', value: '@homaroma', href: '#' },
|
||||
{ icon: '📍', label: 'Studio', value: 'Bangkok, Thailand', href: '#' },
|
||||
].map(item => (
|
||||
<a key={item.label} href={item.href} className="flex items-start gap-4 group">
|
||||
|
||||
@@ -24,8 +24,8 @@ function formatDiscount(type: string, value: number) {
|
||||
}
|
||||
|
||||
export const metadata = {
|
||||
title: 'โปรโมชั่นและคูปองส่วนลด | iRelax',
|
||||
description: 'รวมรหัสส่วนลดและโปรโมชั่นพิเศษจาก iRelax สำหรับการสั่งซื้อน้ำหอมและผลิตภัณฑ์อโรม่าที่คุณชื่นชอบ',
|
||||
title: 'โปรโมชั่นและคูปองส่วนลด | HomAroma',
|
||||
description: 'รวมรหัสส่วนลดและโปรโมชั่นพิเศษจาก HomAroma สำหรับการสั่งซื้อน้ำหอมและผลิตภัณฑ์อโรม่าที่คุณชื่นชอบ',
|
||||
}
|
||||
|
||||
export default async function CouponsPage() {
|
||||
@@ -48,7 +48,7 @@ export default async function CouponsPage() {
|
||||
<h2 className="text-xl font-bold text-white mb-2">ยังไม่มีคูปองส่วนลดในขณะนี้</h2>
|
||||
<p className="text-slate-400 mb-6">กรุณากลับมาตรวจสอบโปรโมชั่นใหม่ในภายหลัง</p>
|
||||
<a
|
||||
href="https://irelaxaroma.shop/shop"
|
||||
href="https://homaroma.shop/shop"
|
||||
className="inline-flex px-8 py-3 bg-cyan-glow/10 text-cyan-glow hover:bg-cyan-glow hover:text-night-900 font-bold rounded-xl transition-all"
|
||||
>
|
||||
ไปช้อปปิ้งกันก่อน
|
||||
@@ -92,7 +92,7 @@ export default async function CouponsPage() {
|
||||
</div>
|
||||
|
||||
<a
|
||||
href={`https://irelaxaroma.shop/shop?coupon=${coupon.code}`}
|
||||
href={`https://homaroma.shop/shop?coupon=${coupon.code}`}
|
||||
className="w-full py-4 bg-white/5 hover:bg-cyan-glow text-white hover:text-night-900 font-bold rounded-xl flex items-center justify-center gap-2 transition-all duration-300"
|
||||
>
|
||||
ช้อปพร้อมใช้คูปองเลย
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { Metadata } from 'next'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'FAQ | iRelax Aroma',
|
||||
description: 'Everything you need to know about iRelax products, shipping, and care.',
|
||||
title: 'FAQ | HomAroma',
|
||||
description: 'Everything you need to know about HomAroma products, shipping, and care.',
|
||||
}
|
||||
|
||||
export default function FaqLayout({ children }: { children: React.ReactNode }) {
|
||||
|
||||
@@ -5,7 +5,7 @@ const FAQS = [
|
||||
{
|
||||
category: 'Products', icon: '🌿',
|
||||
items: [
|
||||
{ q: 'What are the ingredients in your aroma products?', a: 'All iRelax products are crafted from 100% natural botanical extracts, pure essential oils, and pharmaceutical-grade carrier bases. We never use synthetic fragrances, parabens, or harmful chemicals. Each product label lists full ingredient transparency.' },
|
||||
{ q: 'What are the ingredients in your aroma products?', a: 'All HomAroma products are crafted from 100% natural botanical extracts, pure essential oils, and pharmaceutical-grade carrier bases. We never use synthetic fragrances, parabens, or harmful chemicals. Each product label lists full ingredient transparency.' },
|
||||
{ q: 'How long does each product last?', a: 'Our Reed Diffusers last 4–8 weeks depending on room size and airflow. Aroma Oils (30ml) last approximately 3–4 months with normal use. Room Sprays (100ml) provide 60–80 uses. Car Diffusers cartridges last up to 45 days.' },
|
||||
{ q: 'Are your products suitable for sensitive skin or allergies?', a: 'We recommend patch testing before topical use. Our Aroma Oils are formulated for diffuser use primarily. If you have known fragrance allergies, consult our scent guide or contact us with your specific concerns.' },
|
||||
{ q: 'What is the difference between Aroma Oil and Oil Ozone?', a: 'Aroma Oils are pure essential oil blends designed for aromatherapy diffusers and therapeutic use. Oil Ozone is our premium line featuring ozone-infused botanical extracts — designed for air purification and deeper space transformation.' },
|
||||
@@ -48,7 +48,7 @@ export default function FaqPage() {
|
||||
<div className="pt-32 pb-16 px-6 text-center space-y-4 border-b border-white/5 bg-night-800/20">
|
||||
<p className="text-cyan-glow uppercase tracking-[0.4em] text-xs font-semibold opacity-70">Support</p>
|
||||
<h1 className="text-5xl font-bold">Frequently Asked Questions</h1>
|
||||
<p className="text-slate-400 max-w-lg mx-auto">Everything you need to know about iRelax products, shipping, and care.</p>
|
||||
<p className="text-slate-400 max-w-lg mx-auto">Everything you need to know about HomAroma products, shipping, and care.</p>
|
||||
</div>
|
||||
|
||||
<div className="max-w-4xl mx-auto px-6 py-16 space-y-10">
|
||||
|
||||
@@ -6,7 +6,7 @@ import ClientProviders from '../components/ClientProviders';
|
||||
import { API_BASE } from '../lib/api';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'iRelax Aroma',
|
||||
title: 'HomAroma',
|
||||
description: 'Pure Origins, Artisan Craft, Zero Compromise',
|
||||
};
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ async function getRelated(categoryId: number, excludeId: number): Promise<Produc
|
||||
export async function generateMetadata({ params }: { params: Promise<{ id: string }> }): Promise<Metadata> {
|
||||
const { id } = await params
|
||||
const product = await getProduct(id)
|
||||
if (!product) return { title: 'Product Not Found | iRelax' }
|
||||
if (!product) return { title: 'Product Not Found | HomAroma' }
|
||||
return {
|
||||
title: `${product.scent.name} ${product.category.name} | iRelax Aroma`,
|
||||
description: product.description ?? `Premium ${product.category.name} — ${product.scent.name}. Shop iRelax Aroma for high-quality botanical scents.`,
|
||||
title: `${product.scent.name} ${product.category.name} | HomAroma`,
|
||||
description: product.description ?? `Premium ${product.category.name} — ${product.scent.name}. Shop HomAroma for high-quality botanical scents.`,
|
||||
openGraph: {
|
||||
title: product.scent.name,
|
||||
description: product.description ?? '',
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Article } from '@homaroma/types'
|
||||
import { API_BASE } from '../../lib/api'
|
||||
|
||||
export const metadata = {
|
||||
title: 'Scent Guide | iRelax Aroma',
|
||||
title: 'Scent Guide | HomAroma',
|
||||
description: 'Explore our collection of aroma articles, guides, and sensory knowledge to find your perfect scent.',
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Metadata } from 'next'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Search Products | iRelax Aroma',
|
||||
title: 'Search Products | HomAroma',
|
||||
description: 'Search our collection of premium aroma products by scent or product name.',
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Metadata } from 'next'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Shop All Products | iRelax Aroma',
|
||||
title: 'Shop All Products | HomAroma',
|
||||
description: 'Browse our full range of premium aroma products — crafted to elevate every space.',
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export default function Footer({ categories = [] }: FooterProps) {
|
||||
<div className="max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-4 gap-12">
|
||||
<div className="space-y-6">
|
||||
<div className="text-2xl font-bold tracking-widest">
|
||||
iRelax <span className="text-cyan-glow text-sm font-light italic">Essential</span>
|
||||
HomAroma <span className="text-cyan-glow text-sm font-light italic">Essential</span>
|
||||
</div>
|
||||
<p className="text-slate-500 text-sm leading-relaxed">
|
||||
{t('footer.catchphrase')}
|
||||
@@ -65,7 +65,7 @@ export default function Footer({ categories = [] }: FooterProps) {
|
||||
</button>
|
||||
</div>
|
||||
<p className="text-[10px] text-slate-600 uppercase tracking-widest">
|
||||
© {new Date().getFullYear()} iRelax Essential. {t('footer.rights')}
|
||||
© {new Date().getFullYear()} HomAroma. {t('footer.rights')}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@ export default function Navbar({ categories = [] }: NavbarProps) {
|
||||
const toggleLanguage = () => {
|
||||
const newLang = i18n.language.startsWith('en') ? 'th' : 'en'
|
||||
i18n.changeLanguage(newLang)
|
||||
localStorage.setItem('irelax_lang', newLang)
|
||||
localStorage.setItem('homaroma_lang', newLang)
|
||||
}
|
||||
|
||||
// Detect scroll for navbar bg change
|
||||
@@ -36,7 +36,7 @@ export default function Navbar({ categories = [] }: NavbarProps) {
|
||||
window.addEventListener('scroll', onScroll, { passive: true })
|
||||
|
||||
// Check local orders periodically (or just on mount)
|
||||
const stored = localStorage.getItem('irelax_local_orders')
|
||||
const stored = localStorage.getItem('homaroma_local_orders')
|
||||
if (stored) {
|
||||
try { setLocalOrdersCount(JSON.parse(stored).length) } catch (e) {}
|
||||
}
|
||||
@@ -75,7 +75,7 @@ export default function Navbar({ categories = [] }: NavbarProps) {
|
||||
>
|
||||
{/* Logo */}
|
||||
<Link href="/" onClick={() => setMobileOpen(false)} className="text-xl md:text-2xl font-bold tracking-widest text-white uppercase italic shrink-0">
|
||||
iRelax <span className="text-cyan-glow text-xs md:text-sm not-italic font-light opacity-60">Essential</span>
|
||||
HomAroma <span className="text-cyan-glow text-xs md:text-sm not-italic font-light opacity-60">Essential</span>
|
||||
</Link>
|
||||
|
||||
{/* ── DESKTOP NAV ── */}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
* 3. Fallback dev — http://localhost:3000/api
|
||||
*
|
||||
* Dev: NEXT_PUBLIC_API_URL=http://localhost:3000/api
|
||||
* Production: NEXT_PUBLIC_API_URL=https://api.irelaxaroma.shop/api
|
||||
* Production: NEXT_PUBLIC_API_URL=https://api.homaroma.shop/api
|
||||
*/
|
||||
export const API_BASE =
|
||||
process.env.NEXT_PUBLIC_API_URL ||
|
||||
|
||||
@@ -5,7 +5,7 @@ import enTranslation from '../locales/en/translation.json'
|
||||
import thTranslation from '../locales/th/translation.json'
|
||||
|
||||
// Ensure we only access localStorage on the client side
|
||||
const savedLang = typeof window !== 'undefined' ? (localStorage.getItem('irelax_lang') || 'th') : 'th'
|
||||
const savedLang = typeof window !== 'undefined' ? (localStorage.getItem('homaroma_lang') || 'th') : 'th'
|
||||
|
||||
// Check if it's already initialized to prevent re-initialization on HMR
|
||||
if (!i18n.isInitialized) {
|
||||
|
||||
@@ -71,7 +71,7 @@ export const useCartStore = create<CartState>()(
|
||||
}
|
||||
}),
|
||||
{
|
||||
name: 'irelax-cart-storage',
|
||||
name: 'homaroma-cart-storage',
|
||||
partialize: (state) => ({ items: state.items }), // Only persist items, not UI state
|
||||
}
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user