chore: release [ci skip]
This commit is contained in:
@@ -14,7 +14,10 @@ interface AuthContextType {
|
||||
user: User | null;
|
||||
setUser: (user: User | null) => void;
|
||||
isInitialized: boolean;
|
||||
login: (username: string, password: string) => Promise<{ ok: boolean; status?: number }>;
|
||||
login: (
|
||||
username: string,
|
||||
password: string,
|
||||
) => Promise<{ ok: boolean; status?: number }>;
|
||||
logout: () => void;
|
||||
}
|
||||
|
||||
@@ -36,7 +39,10 @@ export function AuthProvider({ children }: { children: ReactNode }) {
|
||||
setIsInitialized(true);
|
||||
}, []);
|
||||
|
||||
const login = async (username: string, password: string): Promise<{ ok: boolean; status?: number }> => {
|
||||
const login = async (
|
||||
username: string,
|
||||
password: string,
|
||||
): Promise<{ ok: boolean; status?: number }> => {
|
||||
const isPhone = /^0\d{9}$/.test(username.trim());
|
||||
const role = isPhone ? "customer" : "manager";
|
||||
|
||||
|
||||
+4
-2
@@ -254,7 +254,8 @@ export const MOCK_COMBOS: Combo[] = [
|
||||
{
|
||||
id: 2,
|
||||
name: "Group Tea Combo",
|
||||
description: "2 peach orange lemongrass teas + 2 matcha green teas, perfect for a group.",
|
||||
description:
|
||||
"2 peach orange lemongrass teas + 2 matcha green teas, perfect for a group.",
|
||||
price: 130000,
|
||||
image: "/imgs/products/placeholder.jpg",
|
||||
items: [
|
||||
@@ -266,7 +267,8 @@ export const MOCK_COMBOS: Combo[] = [
|
||||
{
|
||||
id: 3,
|
||||
name: "Morning Combo",
|
||||
description: "1 milk coffee + 1 caramel flan — start your day on a sweet note.",
|
||||
description:
|
||||
"1 milk coffee + 1 caramel flan — start your day on a sweet note.",
|
||||
price: 48000,
|
||||
image: "/imgs/products/placeholder.jpg",
|
||||
items: [
|
||||
|
||||
Reference in New Issue
Block a user