Freeze after change embedded app route

Freeze after change embedded app route

Lucifer4
Shopify Partner
11 0 3

Hi,

I'm working on a Remix embedded app, and I have an issue with route redirection. When I try to change the route using the left navigation menu, my app first reloads to the previous page and then, after one second, redirects to
the new page. I've used loaders in the routes—maybe that's causing the issue. What can I do to fix this? Am I doing something wrong?

app._index.tsx

export async function
loader({ request }) {
const { session, billing, cors } = await authenticate.admin(request);
const billingCheck = await billing.check({
plans: [PlanNames.Expert, PlanNames.Professional],
});
const subscription = billingCheck.appSubscriptions[0];
const initialData = await getInitialData(session.id);

return cors(
json({
...initialData,
session,
subscription,
developmentMode: developmentMode,
}),
);
}
app.tsx

export default function
App() {
const { apiKey } = useLoaderData<LoaderResponse>();
const { t } = useTranslation();
return (
<AppProvider apiKey={apiKey}>
<ui-nav-menu>
<Link to="/app" rel="home">
{t("home")}
</Link>
<Link to="/app/issueList">{t("issueList")}</Link>
<Link to="/app/settings">{t("settings")}</Link>
<Link to="/app/plans">{t("plans")}</Link>
</ui-nav-menu>
<Outlet />
</AppProvider>
);
}
Reply 1 (1)

LizHoang
Shopify Partner
807 94 124

Hi @Lucifer4, thanks for reaching out. 

 

In this case, I recommend you reach out to the third-party app's support team for further assistance. 

 

Liz

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Check our Joy Rewards & Loyalty Program