Minor adjustments and fixes

This commit is contained in:
Patrick Fic
2020-02-19 13:26:50 -08:00
parent 0b47fb166e
commit faed2c32b6
10 changed files with 95 additions and 52 deletions

View File

@@ -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} />;
});