Skip to content

Commit

Permalink
Merge branch 'main' of github.com:theopensystemslab/planx-new into je…
Browse files Browse the repository at this point in the history
…ss/override-constraints
  • Loading branch information
jessicamcinchak committed May 28, 2024
2 parents dc5cf0c + ad48c21 commit 7058594
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import React from "react";
import type { SiteAddress } from "../FindProperty/model";
import { FETCH_BLPU_CODES } from "../FindProperty/Public";
import { ErrorSummaryContainer } from "../shared/Preview/ErrorSummaryContainer";
import { MapContainer } from "../shared/Preview/MapContainer";
import type { PropertyInformation } from "./model";

export default Component;
Expand Down Expand Up @@ -79,16 +80,6 @@ export interface PresentationalProps {
handleSubmit?: handleSubmit;
}

const MapContainer = styled(Box)(({ theme }) => ({
padding: theme.spacing(1, 0),
width: "100%",
maxWidth: "none",
"& my-map": {
width: "100%",
height: "60vh",
},
}));

// Export this component for testing visual presentation with mocked props
export function Presentational(props: PresentationalProps) {
const {
Expand All @@ -103,7 +94,11 @@ export function Presentational(props: PresentationalProps) {
overrideAnswer,
handleSubmit,
} = props;
const teamName = useStore((state) => state.teamName);
const [teamName, environment] = useStore((state) => [
state.teamName,
state.previewEnvironment,
]);

const propertyDetails: PropertyDetail[] = [
{
heading: "Address",
Expand Down Expand Up @@ -131,7 +126,7 @@ export function Presentational(props: PresentationalProps) {
return (
<Card handleSubmit={handleSubmit}>
<CardHeader title={title} description={description} />
<MapContainer>
<MapContainer environment={environment}>
<p style={visuallyHidden}>
A static map centred on the property address, showing the title
boundary, often called the "blue-line" boundary in planning, of your
Expand Down
2 changes: 1 addition & 1 deletion editor.planx.uk/src/ui/icons/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function EditorIcon(props: SvgIconProps) {
>
<polygon
points="15.54 13.6 15.41 13.6 15.41 10.67 15.41 10.4 15.41 9.34 10.8 9.34 10.8 6.41 15.3 6.41 15.3 1.11 10.8 1.11 9.47 1.11 4.7 1.11 4.7 6.41 9.47 6.41 9.47 9.34 4.59 9.34 4.59 10.4 4.59 10.67 4.59 13.6 4.46 13.6 2.07 13.6 2.07 18.91 4.59 18.91 5.92 18.91 8.44 18.91 8.44 13.6 6.05 13.6 5.92 13.6 5.92 10.67 14.08 10.67 14.08 13.6 13.95 13.6 11.56 13.6 11.56 18.91 14.08 18.91 15.41 18.91 17.93 18.91 17.93 13.6 15.54 13.6"
stroke-width="0"
strokeWidth="0"
/>
</SvgIcon>
);
Expand Down

0 comments on commit 7058594

Please sign in to comment.