Hi everyone,
I set the Initial Path using q in Dev Mode, but the mini app still ignores it and always loads /, on both iOS and Android.
Is this a known issue or am I missing something?
Thanks!
Hi everyone,
I set the Initial Path using q in Dev Mode, but the mini app still ignores it and always loads /, on both iOS and Android.
Is this a known issue or am I missing something?
Thanks!
Yup, same here, even though changing the path does change the QR pattern.
Hey!
Yes I think you’re right that there’s an issue with deeplinks from the qr code screen that use query strings - could you both send me the:
const {hash, path, queryParams} = useDeeplink()I’ve created a ticket to fix this (internal id #88952) but it would be great if you could help me with those details so I can verify the fix - thanks!
1) custom deeplink you are trying to test:
https://shop.app/mini/[handle]/list/123?devParams=eyJkZXZ...
2) what you enter in the qr code screen
/list/123
3) the deeplink that is generated
See 1)
4) details about what happens when you try to scan the code
It opens the mini, but on the root page (/).
5) if the mini loads can you also show me the output from const {hash, path, queryParams} = useDeeplink()
Hash: “"
Path: “/list/123"
queryParams: {}
So we have to navigate to the deeplink ourselves I guess? I thought useDeeplink was for generating a deep link, not for reading it! In the documentation it says:
Your Mini will open directly to the specified path
I applied this and it fixed the issue:
const { path, queryParams } = useDeeplink();
const navigate = useNavigateWithTransition();
// Handle deeplink
useEffect(() => {
if (path && path !== ROUTES.HOME) {
navigate(ROUTES.HOME, { replace: true });
navigate(`${path}${queryParams ? `?${queryParams}` : ""}`);
}
}, [path, queryParams]);
Thanks @steve-t-shopify tested it today on the latest SDK, works like a charm!
Yes currently it is not automatically linked to your router but I agree this would be more intuitive - I’ll add this to the ticket I already created (internal id #88952)