Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
codemonkey800 committed Dec 13, 2022
1 parent c800a29 commit 8a0324d
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 43 deletions.
3 changes: 0 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@
"// Type checks codebase with TypeScript": "",
"type-check": "tsc -p tsconfig.json --noEmit"
},
"resolutions": {
"@types/react": "18.0.26"
},
"dependencies": {
"@emotion/css": "11.10.5",
"@emotion/react": "11.10.5",
Expand Down
12 changes: 9 additions & 3 deletions frontend/src/components/CategoryChip/CategoryChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ function BaseCategoryChip(
className="underline"
href={`/?${STATE_KEY_MAP[dimension] ?? ''}=${term}`}
>
{t(`pluginData:category.labels.${term}` as I18nKeys<'common'>)}
{
t(
`pluginData:category.labels.${term}` as I18nKeys<'common'>,
) as ReactNode
}
</Link>
) : (
<span>{term}</span>
Expand Down Expand Up @@ -96,7 +100,7 @@ function BaseCategoryChip(
)}
>
<span className="font-semibold text-sm">{categoryType}</span>
<span className="text-xs">{tooltipBody}</span>
<span className="text-xs">{tooltipBody as ReactNode}</span>
<span className="text-xs italic">
{t('pluginData:category.clickToAdd')}
</span>
Expand Down Expand Up @@ -156,7 +160,9 @@ function BaseCategoryChip(
}}
label={
<div className="flex items-center space-x-sds-xxs">
<span className="font-semibold space-x-sds-xxs">{chipBody}</span>
<span className="font-semibold space-x-sds-xxs">
{chipBody as ReactNode}
</span>
{isTapDevice ? icon : renderTooltip(icon)}
</div>
}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/CollectionPage/CollectionLinks.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import clsx from 'clsx';
import { useTranslation } from 'next-i18next';
import { ReactNode } from 'react';
import { GitHub, OrcID, Twitter, Website } from 'src/components/icons';
import { Link } from 'src/components/Link';
import { Tooltip } from 'src/components/Tooltip';
Expand Down Expand Up @@ -61,7 +62,7 @@ function CollectionLink({ linkKey }: CollectionLinkProps) {
'!text-[#5b5b5b] !text-xs',
),
}}
title={tooltip}
title={tooltip as ReactNode}
placement="bottom"
disableInteractive
leaveDelay={0}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/SearchPage/PluginSortByForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import RadioGroup from '@mui/material/RadioGroup';
import clsx from 'clsx';
import { motion } from 'framer-motion';
import { useTranslation } from 'next-i18next';
import { ReactNode } from 'react';
import type { TFuncKey } from 'react-i18next';
import { useSnapshot } from 'valtio';

Expand Down Expand Up @@ -85,7 +86,7 @@ function SortForm() {
color="default"
/>
}
label={t(`homePage:${SORT_BY_LABELS[sortType]}`)}
label={t(`homePage:${SORT_BY_LABELS[sortType]}`) as ReactNode}
/>
</motion.div>
))}
Expand Down
82 changes: 47 additions & 35 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -527,13 +527,20 @@
dependencies:
regenerator-runtime "^0.13.4"

"@babel/runtime@^7.18.3", "@babel/runtime@^7.19.0":
"@babel/runtime@^7.18.3":
version "7.20.1"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.1.tgz#1148bb33ab252b165a06698fde7576092a78b4a9"
integrity sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==
dependencies:
regenerator-runtime "^0.13.10"

"@babel/runtime@^7.19.0", "@babel/runtime@^7.20.1":
version "7.20.6"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.6.tgz#facf4879bfed9b5326326273a64220f099b0fce3"
integrity sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==
dependencies:
regenerator-runtime "^0.13.11"

"@babel/runtime@^7.3.1":
version "7.13.17"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.17.tgz"
Expand Down Expand Up @@ -668,7 +675,7 @@
source-map "^0.5.7"
stylis "4.1.3"

"@emotion/cache@^11.10.3", "@emotion/cache@^11.10.5":
"@emotion/cache@^11.10.5":
version "11.10.5"
resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.10.5.tgz#c142da9351f94e47527ed458f7bbbbe40bb13c12"
integrity sha512-dGYHWyzTdmK+f2+EnIGBpkz1lKc4Zbj2KHd4cX3Wi8/OWr5pKslNjc3yABKH4adRGCvSX4VDC0i04mrrq0aiRA==
Expand Down Expand Up @@ -1159,9 +1166,9 @@
react-is "^18.2.0"

"@mui/core-downloads-tracker@^5.10.13":
version "5.10.13"
resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.13.tgz#34068ede2853392ca4fd82ad16d9c1ca664f69b3"
integrity sha512-zWkWPV/SaNdsIdxAWiuVGZ+Ue3BkfSIlU/BFIrJmuUcwiIa7gQsbI/DOpj1KzLvqZhdEe2wC1aG4nCHfzgc1Hg==
version "5.10.17"
resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.10.17.tgz#ce105d692b77fcb41e0c060f3aea0c8ca566ff5a"
integrity sha512-iNwUuMA30nrN0tiEkeD3zaczv7Tk2jlZIDbXRnijAsYXkZtl/xEzQsVRIPYRDuyEz6D18vQJhV8h7gPUXEubTg==

"@mui/[email protected]":
version "5.10.9"
Expand All @@ -1188,22 +1195,22 @@
react-is "^18.2.0"
react-transition-group "^4.4.5"

"@mui/private-theming@^5.10.9":
version "5.10.9"
resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-5.10.9.tgz#c427bfa736455703975cdb108dbde6a174ba7971"
integrity sha512-BN7/CnsVPVyBaQpDTij4uV2xGYHHHhOgpdxeYLlIu+TqnsVM7wUeF+37kXvHovxM6xmL5qoaVUD98gDC0IZnHg==
"@mui/private-theming@^5.10.16", "@mui/private-theming@^5.10.9":
version "5.10.16"
resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-5.10.16.tgz#181ab7568a3cf0c6b12cc12f5a91aeb4509df1ce"
integrity sha512-0MArkJaOHRCKqL/GWjngGZmyOeRz+uxffhx82bKcewr8swqV7xx7EFP02pk0L/gLdfcvYdqwH4YTVjG/+TaKrg==
dependencies:
"@babel/runtime" "^7.19.0"
"@mui/utils" "^5.10.9"
"@babel/runtime" "^7.20.1"
"@mui/utils" "^5.10.16"
prop-types "^15.8.1"

"@mui/styled-engine@^5.10.8":
version "5.10.8"
resolved "https://registry.yarnpkg.com/@mui/styled-engine/-/styled-engine-5.10.8.tgz#2db411e4278f06f70ccb6b5cd56ace67109513f6"
integrity sha512-w+y8WI18EJV6zM/q41ug19cE70JTeO6sWFsQ7tgePQFpy6ToCVPh0YLrtqxUZXSoMStW5FMw0t9fHTFAqPbngw==
"@mui/styled-engine@^5.10.16":
version "5.10.16"
resolved "https://registry.yarnpkg.com/@mui/styled-engine/-/styled-engine-5.10.16.tgz#52a2d31e4012958d21c92b42acaca4c3e79841b4"
integrity sha512-ZMSjXvtiGwGDKqrSlXhpxK2voUaF2/lpC/pSTfFmZvKH9j9a9h1/iwo3ybgjFVYGgbfNeW4h0xEchiRohu9xsw==
dependencies:
"@babel/runtime" "^7.19.0"
"@emotion/cache" "^11.10.3"
"@babel/runtime" "^7.20.1"
"@emotion/cache" "^11.10.5"
csstype "^3.1.1"
prop-types "^15.8.1"

Expand Down Expand Up @@ -1231,30 +1238,30 @@
prop-types "^15.8.1"

"@mui/system@^5.10.13":
version "5.10.13"
resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.10.13.tgz#b32a4441f9dd0760724cdbccf0a09728e63e3674"
integrity sha512-Xzx26Asu5fVlm0ucm+gnJmeX4Y1isrpVDvqxX4yJaOT7Fzmd8Lfq9ih3QMfZajns5LMtUiOuCQlVFRtUG5IY7A==
dependencies:
"@babel/runtime" "^7.19.0"
"@mui/private-theming" "^5.10.9"
"@mui/styled-engine" "^5.10.8"
"@mui/types" "^7.2.0"
"@mui/utils" "^5.10.9"
version "5.10.17"
resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.10.17.tgz#64420b6b01c3943c0ce58523090b19791db46c53"
integrity sha512-UYzAOSK7uxkMsUssqrIUW3lnOuQpU8vqh4hLwfSw+GYAnQo3qjK4m4NhlDx+pFpsjjiGnr3K+vrSH+aIAMbcLg==
dependencies:
"@babel/runtime" "^7.20.1"
"@mui/private-theming" "^5.10.16"
"@mui/styled-engine" "^5.10.16"
"@mui/types" "^7.2.2"
"@mui/utils" "^5.10.16"
clsx "^1.2.1"
csstype "^3.1.1"
prop-types "^15.8.1"

"@mui/types@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.0.tgz#91380c2d42420f51f404120f7a9270eadd6f5c23"
integrity sha512-lGXtFKe5lp3UxTBGqKI1l7G8sE2xBik8qCfrLHD5olwP/YU0/ReWoWT7Lp1//ri32dK39oPMrJN8TgbkCSbsNA==
"@mui/types@^7.2.0", "@mui/types@^7.2.2":
version "7.2.2"
resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.2.tgz#723f6d40c25c89c2e0352a7e51794e8eb77cdbe3"
integrity sha512-siex8cZDtWeC916cXOoUOnEQQejuMYmHtc4hM6VkKVYaBICz3VIiqyiAomRboTQHt2jchxQ5Q5ATlbcDekTxDA==

"@mui/utils@^5.10.9":
version "5.10.9"
resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.10.9.tgz#9dc455f9230f43eeb81d96a9a4bdb3855bb9ea39"
integrity sha512-2tdHWrq3+WCy+G6TIIaFx3cg7PorXZ71P375ExuX61od1NOAJP1mK90VxQ8N4aqnj2vmO3AQDkV4oV2Ktvt4bA==
"@mui/utils@^5.10.16", "@mui/utils@^5.10.9":
version "5.10.16"
resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.10.16.tgz#7a981444855968ebdb1830d76e298d1ac47eaaf6"
integrity sha512-3MB/SGsgiiu9Z55CFmAfiONUoR7AAue/H4F6w3mc2LnhFQCsoVvXhioDPcsiRpUMIQr34jDPzGXdCuqWooPCXQ==
dependencies:
"@babel/runtime" "^7.19.0"
"@babel/runtime" "^7.20.1"
"@types/prop-types" "^15.7.5"
"@types/react-is" "^16.7.1 || ^17.0.0"
prop-types "^15.8.1"
Expand Down Expand Up @@ -9502,6 +9509,11 @@ regenerator-runtime@^0.13.10:
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz#ed07b19616bcbec5da6274ebc75ae95634bfc2ee"
integrity sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw==

regenerator-runtime@^0.13.11:
version "0.13.11"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==

regenerator-runtime@^0.13.4:
version "0.13.7"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz"
Expand Down

0 comments on commit 8a0324d

Please sign in to comment.