Hi,
I created a countdown timer app using Checkout UI Extensions. Once the timer finishes, I want it to redirect to the home page. However, I tried using applyRedirect, but it doesn’t seem to work.
Could you please check my code and help me fix it? Thanks!
import {
reactExtension,
Banner,
Text,
useApi,
useTranslate,
} from "@shopify/ui-extensions-react/checkout";
import { useEffect, useState } from "react";
export default reactExtension("purchase.checkout.block.render", () => (
1 Like
Hi, @jdthann . Here is updated code:
import {
reactExtension,
Banner,
Text,
useApi,
useTranslate,
} from "@shopify/ui-extensions-react/checkout";
import { useEffect, useState } from "react";
export default reactExtension("purchase.checkout.block.render", () => (
If this helpful, please give us a like and mark it as solution. Thanks you :heart_eyes:
Hi, @B2Bridge !
Thanks for the updated code. I tried updating mine, but it still gets stuck on the checkout page and does not redirect to the home page. Is there another solution?
1 Like
Try this and let me know if this work:
import {
reactExtension,
Banner,
Text,
useApi,
useTranslate,
} from "@shopify/ui-extensions-react/checkout";
import { useEffect, useState } from "react";
export default reactExtension("purchase.checkout.block.render", () => (