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
@@ -0,0 +1,10 @@
|
||||
import { signInPath } from "~/utils/auth";
|
||||
|
||||
/** Send a signed-out shopper to sign in and back to the page they were on. */
|
||||
export function useSignInRedirect() {
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
return async function signInThenReturn(): Promise<void> {
|
||||
await router.push(signInPath(route.fullPath));
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user