Skip to content

Commit

Permalink
Merge pull request #53 from cinaaaa/feat/study-areas
Browse files Browse the repository at this point in the history
fix: group loading & colors
  • Loading branch information
cinaaaa authored Aug 22, 2022
2 parents 4c08fb1 + b930841 commit ba75e13
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/resources/studyareas/StudyAreasEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import {
Toolbar,
SaveButton,
useEditController,
SelectInput,
useRefresh
SelectInput
} from "react-admin";
import {
addGeoStoresConfig,
Expand All @@ -26,6 +25,7 @@ import { GeoStorePickerComponent } from "./components/GeoStorePicker.component";
import { OpportunityCreatorComponent } from "./components/OpportunityCreator.component";
import { OpportunityViewerComponent } from "./components/OpportunityViewer.component";
import { Opportunity } from "@types";
import { getLayerGroups } from "@context/layers";

const displayStyle = { xs: "block", sm: "flex", width: "100%" };

Expand All @@ -41,7 +41,6 @@ const CustomToolbar = (props: any) => {
};

export default function StudyAreasEdit() {
const refresh = useRefresh();
const dispatch = useAppDispatch();
const { save } = useEditController();
const redirect = useRedirect();
Expand All @@ -64,6 +63,7 @@ export default function StudyAreasEdit() {
return batch(() => {
dispatch(getStudyAreasOpportunities(parseFloat(id as string)));
dispatch(getGeoStoresConfig(parseFloat(id as string)));
dispatch(getLayerGroups());
});
}, []);

Expand Down Expand Up @@ -255,6 +255,7 @@ export default function StudyAreasEdit() {
label="View"
color="secondary"
onClick={() => setOpportunityData(i)}
sx={{ backgroundColor: "#2bb381" }}
/>
</Box>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function GeoStorePickerComponent(props: {
<Chip
label="Add GeoStore + "
color="success"
sx={{ margin: 1 }}
sx={{ margin: 1, backgroundColor: "#2bb381" }}
onClick={() => setDialogOpen(true)}
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function LayerPickerComponent(props: {
<Chip
label="Add Layer + "
color="success"
sx={{ margin: 1 }}
sx={{ margin: 1, backgroundColor: "#2bb381" }}
onClick={() => setDialogOpen(true)}
/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function OpportunityCreatorComponent(props: { studyAreaId: number }) {
<Chip
label="Create Opportunity + "
color="success"
sx={{ margin: 1 }}
sx={{ margin: 1, backgroundColor: "#2bb381" }}
onClick={() => setDialogOpen(true)}
/>

Expand Down

1 comment on commit ba75e13

@vercel
Copy link

@vercel vercel bot commented on ba75e13 Aug 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.