Skip to content
Open
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
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# [2.0.0-beta.192](https://github.com/Greenstand/treetracker-web-map-client/compare/v2.0.0-beta.191...v2.0.0-beta.192) (2022-12-06)


### Features

* cache ([60eeaa4](https://github.com/Greenstand/treetracker-web-map-client/commit/60eeaa49f0fd5d09790e0f3aedbfc27408b8f3ec))
- cache ([60eeaa4](https://github.com/Greenstand/treetracker-web-map-client/commit/60eeaa49f0fd5d09790e0f3aedbfc27408b8f3ec))

# [2.0.0-beta.191](https://github.com/Greenstand/treetracker-web-map-client/compare/v2.0.0-beta.190...v2.0.0-beta.191) (2022-12-05)

Expand Down
8 changes: 4 additions & 4 deletions deployment-beta/overlays/development/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
app: treetracker-web-map-client-beta
annotations:
getambassador.io/config:
getambassador.io/config:
apiVersion: ambassador/v2
kind: Mapping
name: domain-name
Expand All @@ -19,6 +19,6 @@ spec:
selector:
app: treetracker-web-map-client-beta
ports:
- port: 80
protocol: TCP
targetPort: 3000
- port: 80
protocol: TCP
targetPort: 3000
5 changes: 4 additions & 1 deletion src/components/ImpactSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ function ImpactSection() {
mb: 6,
}}
>
<Icon icon={StaticGraph} height={['100%', 487]} width="100%" />
<Icon
icon={StaticGraph}
sx={{ height: ['100%', 487], width: '100%' }}
/>
<Typography
sx={{
position: 'absolute',
Expand Down
14 changes: 3 additions & 11 deletions src/components/LeaderBoard.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,8 @@ function RibbonWrapper({ fill, index }) {
);
}

function TreeImage(isMobile) {
return (
<Icon
icon={TreeIcon}
sx={{
width: !isMobile ? '13.5px' : '12px',
height: !isMobile ? '18px' : '14px',
}}
/>
);
function TreeImage() {
return <Icon icon={TreeIcon} size={28} />;
}

function LeaderBoard(props) {
Expand Down Expand Up @@ -170,7 +162,7 @@ function LeaderBoard(props) {
>
TREES CAPTURED
</Typography>
<TreeImage isMobile={isMobile} />
<TreeImage />
</Grid>
<Grid item xs={1} />
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ function Timeline() {
>
<Icon
icon={TimeIcon}
width={22}
size={[24, 28]}
sx={{
'& path': {
fill: ({ palette }) => palette.primary.main,
Expand Down
6 changes: 2 additions & 4 deletions src/components/TreeInfoDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default function TreeInfoDialog(props) {
},
}}
>
<Icon icon={MaxIcon} width={52} height={52} />
<Icon icon={MaxIcon} size={52} />
</Box>
<Dialog
isFullscreen={isFullscreen}
Expand Down Expand Up @@ -309,9 +309,7 @@ export default function TreeInfoDialog(props) {
}}
>
<Button
startIcon={
<Icon icon={HeartIcon} sx={{ height: 22, width: 24 }} />
}
startIcon={<Icon icon={HeartIcon} size={24} />}
disableElevation
variant="contained"
color="primary"
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/CustomCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function CustomCard({
: palette.success.main,
}}
>
<Icon icon={iconURI} width={36} height={36} {...iconProps} />
<Icon icon={iconURI} size={[24, 36]} {...iconProps} />
</Avatar>
</Box>
<Box
Expand Down
16 changes: 13 additions & 3 deletions src/components/common/CustomIcon.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import SvgIcon from '@mui/material/SvgIcon';

function CustomIcon({ icon, height = '1em', width = '1em', sx = {}, color }) {
function CustomIcon({ icon, size = '1em', sx = {}, color }) {
let formattedSize;

if (typeof size === 'string') {
formattedSize = [`calc(0.75 * ${size})`, size];
} else if (typeof size === 'number') {
formattedSize = [`calc(0.75 * ${size}px)`, `${size}px`];
} else if (size instanceof Array) {
formattedSize = size;
}

return (
<SvgIcon
component={icon}
Expand All @@ -12,8 +22,8 @@ function CustomIcon({ icon, height = '1em', width = '1em', sx = {}, color }) {
'& rect': {
stroke: color,
},
height: [28, height],
width: [28, width],
height: formattedSize,
width: formattedSize,
...sx,
}}
/>
Expand Down
13 changes: 7 additions & 6 deletions src/components/common/Info.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ export default function Info({ info, iconURI }) {
display: 'flex',
alignItems: 'center',
gap: 3,
'& svg': {
filter: 'opacity(0.5)',
maxWidth: 16,
maxHeight: 16,
},
}}
>
<Icon icon={iconURI} />
<Icon
icon={iconURI}
size={[16, 16]}
sx={{
filter: 'opacity(0.5)',
}}
/>
<Typography variant="h6">{info}</Typography>
</Box>
);
Expand Down
3 changes: 1 addition & 2 deletions src/pages/organizations/[organizationid].js
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@ export default function Organization(props) {

<Icon
icon={SearchIcon}
width={48}
height={48}
size={48}
color="grey"
sx={{
fill: 'transparent',
Expand Down
3 changes: 1 addition & 2 deletions src/pages/planters/[planterid].js
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ export default function Planter(props) {
<Box>
<Icon
icon={SearchIcon}
width={48}
height={48}
size={48}
color="grey"
sx={{
fill: 'transparent',
Expand Down
3 changes: 1 addition & 2 deletions src/pages/tokens/[tokenid].js
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@ export default function Token(props) {
<Box>
<Icon
icon={SearchIcon}
width={48}
height={48}
size={48}
color="grey"
sx={{
fill: 'transparent',
Expand Down
3 changes: 1 addition & 2 deletions src/pages/top.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ function Top(props) {
/>
<Icon
icon={Search}
width={48}
height={48}
size={48}
color="grey"
sx={{
fill: 'transparent',
Expand Down