Skip to content

Commit

Permalink
fix: types for emotion
Browse files Browse the repository at this point in the history
  • Loading branch information
ob6160 committed Jun 27, 2021
1 parent a0a0481 commit 4631451
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"presets": [
"next/babel",
"@emotion/babel-preset-css-prop"
],
"plugins": [
"emotion"
]
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@
"@types/puppeteer": "5.4.3",
"@types/react": "17.0.11",
"@types/react-dom": "17.0.8",
"@types/react-leaflet": "2.8.1",
"@types/styled-system": "5.1.11",
"apollo-server-testing": "2.24.1",
"cli-progress": "3.9.0",
"customize-cra": "1.0.0",
Expand Down
8 changes: 7 additions & 1 deletion src/components/Header/MainMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@ const StyledNavLink = styled(NavLink)`
}
`;

interface IMainMenu {
mapCenter?: { lat: number; lng: number; }
onMenuItemClick?: () => void;
children: React.ReactElement;
}

// Todo: Contact link
const MainMenu = ({
mapCenter,
onMenuItemClick,
children,
}) => {
}: IMainMenu) => {
const { isAuthenticated, logout } = useAuth();
const router = useRouter();

Expand Down
8 changes: 7 additions & 1 deletion src/components/PageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ import theme from '../theme';
const LAYOUT_DEFAULT = 'default';
const LAYOUT_BLOG = 'blog';

const PageLayout = ({ mapCenter, layoutMode, children }) => {
interface IPageLayout {
mapCenter?: {lat: number; lng: number;}
layoutMode: 'default' | 'blog';
children: React.ReactElement;
}

const PageLayout = ({ mapCenter, layoutMode, children }: IPageLayout) => {
return (
<ThemeProvider theme={theme}>
<MediaContextProvider>
Expand Down
27 changes: 27 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,11 @@
dependencies:
"@types/node" "*"

"@types/geojson@*":
version "7946.0.7"
resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.7.tgz#c8fa532b60a0042219cdf173ca21a975ef0666ad"
integrity sha512-wE2v81i4C4Ol09RtsWFAqg3BUitWbHSpSlIo+bNdsCJijO9sjme+zm+73ZMCa/qMC8UEERxzGbvmr1cffo2SiQ==

"@types/glob@^7.1.1":
version "7.1.2"
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.2.tgz#06ca26521353a545d94a0adc74f38a59d232c987"
Expand Down Expand Up @@ -1497,6 +1502,13 @@
"@types/koa-compose" "*"
"@types/node" "*"

"@types/leaflet@*":
version "1.7.3"
resolved "https://registry.yarnpkg.com/@types/leaflet/-/leaflet-1.7.3.tgz#0294806f44081519a8c69593f7d0659d6aefda89"
integrity sha512-uIAUQbzow2NxFsKmgOnogUA5A6oQ4ZCJoAet4hhe1RwUw54Tydn1tkpHKMZKbqloTMYAZ0CtCF3MoITAwMJWHw==
dependencies:
"@types/geojson" "*"

"@types/long@^4.0.0":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9"
Expand Down Expand Up @@ -1594,6 +1606,14 @@
dependencies:
"@types/react" "*"

"@types/react-leaflet@2.8.1":
version "2.8.1"
resolved "https://registry.yarnpkg.com/@types/react-leaflet/-/react-leaflet-2.8.1.tgz#acda592cf1b7dfe20ac81071c21c1e5521fe71a4"
integrity sha512-BbFyH9R/MecfXaz1Yt29oGBG8AxIKILgAniO61/kv9/sRe5/qj9yDxf3PW7M+nDl5Wn3V7Mp9inKF0LflV+KkQ==
dependencies:
"@types/leaflet" "*"
"@types/react" "*"

"@types/react-transition-group@^2.0.8":
version "2.9.2"
resolved "https://registry.yarnpkg.com/@types/react-transition-group/-/react-transition-group-2.9.2.tgz#c48cf2a11977c8b4ff539a1c91d259eaa627028d"
Expand Down Expand Up @@ -1655,6 +1675,13 @@
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff"
integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==

"@types/styled-system@5.1.11":
version "5.1.11"
resolved "https://registry.yarnpkg.com/@types/styled-system/-/styled-system-5.1.11.tgz#158849f3b14cdf8bf27a10f0cf87a2c3a89eb680"
integrity sha512-R+JxEZYa5T0HD2urViR/mdklVaGhwbNOtDoWWGQ1+z1CGs/gF1UAKCaS//YwsUwterEKpyaKxgaXyFNKF04GCA==
dependencies:
csstype "^3.0.2"

"@types/tapable@*":
version "1.0.5"
resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.5.tgz#9adbc12950582aa65ead76bffdf39fe0c27a3c02"
Expand Down

0 comments on commit 4631451

Please sign in to comment.