Skip to content

Commit 9b3e209

Browse files
committed
Merge branch 'ReactTypesGauntlet'
2 parents d46e363 + 87b787b commit 9b3e209

8 files changed

Lines changed: 5441 additions & 4458 deletions

File tree

package.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
"@devexpress/dx-react-core": "^2.4.1",
3232
"@devexpress/dx-react-grid": "^2.4.1",
3333
"@devexpress/dx-react-grid-material-ui": "^2.4.1",
34-
"@material-ui/core": "^4.9.1",
35-
"@material-ui/icons": "^4.9.1",
36-
"@material-ui/lab": "^4.0.0-alpha.43",
37-
"@material-ui/styles": "^4.9.0",
34+
"@material-ui/core": "^4.12.4",
35+
"@material-ui/icons": "^4.11.3",
36+
"@material-ui/lab": "^4.0.0-alpha.61",
37+
"@material-ui/styles": "^4.11.5",
3838
"@nivo/bar": "^0.69.1",
3939
"@nivo/core": "^0.69.0",
4040
"@nivo/geo": "^0.69.0",
@@ -51,7 +51,7 @@
5151
"match-sorter": "^4.0.1",
5252
"mobx": "^6.0.4",
5353
"mobx-react-lite": "^3.1.6",
54-
"prop-types": "^15.7.2",
54+
"prop-types": "^15.8.1",
5555
"qs": "^6.7.0",
5656
"query-string": "^7.1.1",
5757
"react": "^16.11.0",
@@ -66,7 +66,7 @@
6666
"react-json-view": "^1.19.1",
6767
"react-lazyload": "^2.6.5",
6868
"react-router-dom": "^5.1.2",
69-
"react-scripts": "4.0.3",
69+
"react-scripts": "5.0.1",
7070
"react-storage-hooks": "^4.0.0",
7171
"react-tooltip-lite": "^1.12.0",
7272
"react-truncate-markup": "^5.0.0",
@@ -88,7 +88,6 @@
8888
"not op_mini all"
8989
],
9090
"devDependencies": {
91-
"@babel/core": "^7.18.6",
9291
"@babel/preset-react": "^7.18.6",
9392
"@babel/preset-typescript": "^7.18.6",
9493
"@crowdin/crowdin-api-client": "^1.9.0",
@@ -114,13 +113,13 @@
114113
"@types/react-dom": "^16.9.2",
115114
"@types/react-helmet": "^6.1.5",
116115
"@types/react-lazyload": "^2.6.0",
117-
"@types/react-router-dom": "^5.1.5",
116+
"@types/react-router-dom": "^5.3.3",
118117
"@types/react-select": "^3.0.11",
119118
"@types/storybook__addon-info": "^4.1.2",
120119
"@types/storybook__react": "^4.0.2",
121120
"@types/swiper": "^5.4.1",
122-
"@typescript-eslint/eslint-plugin": "^4.28.2",
123-
"@typescript-eslint/parser": "^4.28.2",
121+
"@typescript-eslint/eslint-plugin": "^5.38.0",
122+
"@typescript-eslint/parser": "^5.38.0",
124123
"async-retry": "^1.3.1",
125124
"bloom-player": "^2.1.8",
126125
"concurrently": "^5.1.0",

src/components/BlorgLink.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ import { Link as MuiLink } from "@material-ui/core";
66
// for a discussion around how react-router link doesn't handle
77
// external links, see https://github.com/ReactTraining/react-router/issues/1147
88

9-
export interface IBlorgLinkProps
10-
extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
9+
export interface IBlorgLinkProps {
10+
// we'd prefer this extends but mismatching definitions have killed it for now
11+
//extends React.AnchorHTMLAttributes<HTMLAnchorElement>
12+
onClick?: (e: any) => void;
13+
target?: string;
14+
className?: string;
15+
role?: string;
16+
title?: string;
1117
href: string; // href is part of React.AnchorHTMLAttributes<HTMLAnchorElement> but optional; we want required
1218
newTabIfEmbedded?: boolean;
1319
alwaysnewtab?: boolean;
@@ -25,6 +31,7 @@ export const BlorgLink: React.FunctionComponent<IBlorgLinkProps> = (props) => {
2531

2632
const isInIframe = window.self !== window.top;
2733

34+
/* REVIEW: this is causing problems... something is sneaking through that we don't want:*/
2835
const { newTabIfEmbedded, alwaysnewtab, ...propsToPassDown } = props; // Prevent React warnings
2936

3037
// ABOUT MuiLink: we're using this to get the themed color for the link
@@ -56,7 +63,11 @@ export const BlorgLink: React.FunctionComponent<IBlorgLinkProps> = (props) => {
5663
// the Nielsen Norman Group: https://www.nngroup.com/articles/new-browser-windows-and-tabs/
5764
return (
5865
// just a normal <a></a> element, styled to fit the theme
59-
<MuiLink {...propsToPassDown} color={props.color || "primary"}>
66+
<MuiLink
67+
{...propsToPassDown}
68+
target={props.target}
69+
color={props.color || "primary"}
70+
>
6071
{props.children}
6172
</MuiLink>
6273
);
@@ -71,12 +82,11 @@ export const BlorgLink: React.FunctionComponent<IBlorgLinkProps> = (props) => {
7182
/* The initial slash keeps url from just being 'tacked on' to existing url; not what we want here. */
7283
to = `/${to}`;
7384
}
74-
7585
return (
7686
<MuiLink
77-
{...propsToPassDown}
87+
to={props.href}
88+
className={props.className}
7889
component={RouterLink}
79-
to={to}
8090
color={props.color || "primary"}
8191
>
8292
{props.children}

0 commit comments

Comments
 (0)