-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰[Bug] #29
Comments
Hi there, @Martin86Ec!
I think the issue you are having is a result of having I followed along the steps from https://shopify.dev/apps/discounts/create up to the end of Step 2 and didn't see any issues. You should have a import { AppProvider } from '@shopify/discount-app-components'
import '@shopify/discount-app-components/build/esm/styles.css'
export function DiscountProvider({ children }) {
return <AppProvider locale="en-US" ianaTimezone="America/Toronto">{children}</AppProvider>
} as well as this line in export { DiscountProvider } from './DiscountProvider' and then you should have import {
AppBridgeProvider,
QueryProvider,
PolarisProvider,
DiscountProvider
} from "./components"; in and then you will want that provider you created to wrap the children there, so it might look like: return (
<PolarisProvider>
<BrowserRouter>
<AppBridgeProvider>
<DiscountProvider> {/** here*/}
<QueryProvider>
<NavigationMenu
navigationLinks={[
{
label: "Page name",
destination: "/pagename",
},
]}
/>
<Routes pages={pages} />
</QueryProvider>
</DiscountProvider> {/** here*/}
</AppBridgeProvider>
</BrowserRouter>
</PolarisProvider>
); Following step 2 in the I ran through this with the same npm/node/yarn versions as you and everything seemed to work. Please feel free to reach out again if you have further issues! |
Issue summary
Following the discount app tutorial I got a hook error.
After replacing the
<AppProvider>
tag in Volumes/new.jsx with a<div>
tag, the error stops.Expected behavior
The hook error message should not appear.
Actual behavior
Steps to reproduce the problem
Specifications
The text was updated successfully, but these errors were encountered: