feat: persist customer product and shop favorites through the live API
Replace mall fixture favorites with customer-scoped endpoints, and send signed-out shoppers back to the page they left after sign-in. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
94a64ec712
commit
6c1357ec4d
@@ -7,6 +7,7 @@ const { $api } = useNuxtApp();
|
||||
const session = useSessionStore();
|
||||
const cart = useCartStore();
|
||||
const router = useRouter();
|
||||
const signInThenReturn = useSignInRedirect();
|
||||
const activities = ref<GroupBuyingActivityView[]>([]);
|
||||
const loading = ref(true);
|
||||
const error = ref("");
|
||||
@@ -42,7 +43,7 @@ function joined(activity: GroupBuyingActivityView, groupId: string): string {
|
||||
// intent; the server prices and validates it at checkout.
|
||||
async function start(activity: GroupBuyingActivityView, open: boolean): Promise<void> {
|
||||
if (!session.isLoggedIn) {
|
||||
await navigateTo("/login");
|
||||
await signInThenReturn();
|
||||
return;
|
||||
}
|
||||
error.value = "";
|
||||
|
||||
Reference in New Issue
Block a user