Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix navigation tree not showing up #278

Merged
merged 2 commits into from
May 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions imports/client/ui/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { Tracker } from "meteor/tracker";
import { ThemeProvider } from "styled-components";
import { ThemeProvider as MuiThemeProvider } from "@material-ui/core/styles";
import { ApolloProvider } from "react-apollo";
import { DndProvider } from "react-dnd";
import HTML5Backend from "react-dnd-html5-backend";
import { ComponentsProvider } from "@reactioncommerce/components-context";
import { TranslationProvider } from "/imports/plugins/core/ui/client/providers";
import initApollo from "/imports/plugins/core/graphql/lib/helpers/initApollo";
Expand Down Expand Up @@ -78,13 +80,15 @@ Meteor.startup(() => {
<ThemeProvider theme={theme}>
<MuiThemeProvider theme={defaultTheme}>
<SnackbarProvider anchorOrigin={snackbarPosition} maxSnack={3}>
<Route>
{(routeProps) => (
<RouterContext.Provider value={routeProps}>
<App />
</RouterContext.Provider>
)}
</Route>
<DndProvider backend={HTML5Backend}>
<Route>
{(routeProps) => (
<RouterContext.Provider value={routeProps}>
<App />
</RouterContext.Provider>
)}
</Route>
</DndProvider>
</SnackbarProvider>
</MuiThemeProvider>
</ThemeProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import React, { Component } from "react";
import PropTypes from "prop-types";
import { Dialog, DialogContent } from "@material-ui/core";
import Button from "@reactioncommerce/catalyst/Button";
import HTML5Backend from "react-dnd-html5-backend";
import { DragDropContext } from "react-dnd";
import NavigationItemForm from "./NavigationItemForm";
import NavigationTreeContainer from "./NavigationTreeContainer";
import NavigationItemList from "./NavigationItemList";
Expand Down Expand Up @@ -143,4 +141,4 @@ class NavigationDashboard extends Component {
}
}

export default DragDropContext(HTML5Backend)(NavigationDashboard);
export default NavigationDashboard;
Loading