Skip to content

Commit

Permalink
fix: issue #392 Miscellaneous minor errors/warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fustroli committed Jan 3, 2022
1 parent 02a8d85 commit 2f2b7f8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 15 deletions.
3 changes: 1 addition & 2 deletions src/components/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ import { makeStyles } from 'models/makeStyles';
import dynamic from 'next/dynamic';
import React from 'react';

import Navbar from './Navbar';

const App = dynamic(() => import('./App'), { ssr: false });
const Navbar = dynamic(() => import('./Navbar'), { ssr: false });

const useStyles = makeStyles()((theme) => ({
root: {
Expand Down
4 changes: 2 additions & 2 deletions src/components/LayoutMobile.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import Box from '@mui/material/Box';
import log from 'loglevel';
import { makeStyles } from 'models/makeStyles';
import dynamic from 'next/dynamic';
import React from 'react';

import Navbar from './Navbar';
import log from 'loglevel';
import Drawer from './Drawer';

const App = dynamic(() => import('./App'), { ssr: false });
const Navbar = dynamic(() => import('./Navbar'), { ssr: false });

const useStyles = makeStyles()((theme) => ({
root: {
Expand Down
5 changes: 2 additions & 3 deletions src/components/LayoutMobileB.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import Box from '@mui/material/Box';
import log from 'loglevel';
import { makeStyles } from 'models/makeStyles';
import dynamic from 'next/dynamic';
import React from 'react';

import Navbar from './Navbar';
import log from 'loglevel';
import Drawer from './Drawer';

const App = dynamic(() => import('./App'), { ssr: false });
const Navbar = dynamic(() => import('./Navbar'), { ssr: false });

const useStyles = makeStyles()((theme) => ({
root: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function Navbar() {
</Button>
</Link>
<Link href="/">
<Button className={classes.buttonStyle} variant="text" component="a">
<Button className={classes.buttonStyle} variant="text">
Contact Us
</Button>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/DataTag.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function DataTag({ data, location }) {
<CalendarToday sx={{ fontSize: '1.25rem' }} />
)}
<Typography variant="body1" sx={{ fontWeight: 700 }}>
{location || `Planter since`} {data}
{!location && `Planter since`} {data}
</Typography>
</Stack>
);
Expand Down
12 changes: 6 additions & 6 deletions src/pages/planters/[planterid].js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function Planter({ planter }) {
map.setFilters({
userid: planter.id,
});
await map.loadInitialView();
await map?.loadInitialView();
map.rerender();
} else {
log.warn('no data:', map, planter);
Expand All @@ -86,7 +86,7 @@ export default function Planter({ planter }) {

return (
<PageWrapper className={classes.root}>
<Typography variant="h2" classname={classes.textColor}>
<Typography variant="h2" className={classes.textColor}>
{planter.first_name} {planter.last_name}
</Typography>
<Box sx={{ display: 'flex', gap: 2 }}>
Expand Down Expand Up @@ -183,22 +183,22 @@ export default function Planter({ planter }) {
<Divider className={classes.divider} />
<Typography
variant="h4"
classname={classes.textColor}
className={classes.textColor}
sx={{ mt: { xs: 12, md: 20 } }}
>
About
</Typography>
<Typography variant="body1" classname={classes.textColor} mt={7}>
<Typography variant="body1" className={classes.textColor} mt={7}>
{planter.about}
</Typography>
<Typography
variant="h4"
classname={classes.textColor}
className={classes.textColor}
sx={{ mt: { xs: 10, md: 16 } }}
>
Mission
</Typography>
<Typography variant="body1" classname={classes.textColor} mt={7}>
<Typography variant="body1" className={classes.textColor} mt={7}>
{planter.mission}
</Typography>
<Box mt={20} />
Expand Down

0 comments on commit 2f2b7f8

Please sign in to comment.