Minor adjustments and fixes
This commit is contained in:
@@ -7,7 +7,10 @@ import { createStructuredSelector } from "reselect";
|
||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||
import { QUERY_BODYSHOP } from "../../graphql/bodyshop.queries";
|
||||
import { setBodyshop } from "../../redux/user/user.actions";
|
||||
import { selectBodyshop, selectCurrentUser } from "../../redux/user/user.selectors";
|
||||
import {
|
||||
selectBodyshop,
|
||||
selectCurrentUser
|
||||
} from "../../redux/user/user.selectors";
|
||||
import ManagePage from "./manage.page";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
@@ -33,12 +36,10 @@ export default connect(
|
||||
|
||||
useEffect(() => {
|
||||
if (data) setBodyshop(data.bodyshops[0]);
|
||||
return () => {
|
||||
//
|
||||
};
|
||||
return () => {};
|
||||
}, [data, setBodyshop]);
|
||||
|
||||
//TODO Translate later.
|
||||
if (!bodyshop) return <LoadingSpinner message="Loading bodyshop data." />;
|
||||
if (!bodyshop)
|
||||
return <LoadingSpinner message={t("general.labels.loadingshop")} />;
|
||||
return <ManagePage match={match} />;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user