зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1492863 - Fix react warnings in aboutdebugging-new;r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D6400 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
8648acbeb0
Коммит
17903b38b8
|
@ -27,8 +27,8 @@ class App extends PureComponent {
|
|||
dispatch: PropTypes.func.isRequired,
|
||||
messageContexts: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
networkLocations: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||
runtimes: PropTypes.array.isRequired,
|
||||
selectedPage: PropTypes.string.isRequired,
|
||||
runtimes: PropTypes.object.isRequired,
|
||||
selectedPage: PropTypes.string,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class ConnectPage extends PureComponent {
|
|||
dispatch: PropTypes.func.isRequired,
|
||||
// Provided by wrapping the component with FluentReact.withLocalization.
|
||||
getString: PropTypes.func.isRequired,
|
||||
networkLocations: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
networkLocations: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@ class ConnectSteps extends PureComponent {
|
|||
},
|
||||
this.props.steps.map(step => dom.li(
|
||||
{
|
||||
className: "connect-page__step"
|
||||
className: "connect-page__step",
|
||||
key: step,
|
||||
},
|
||||
step)
|
||||
)
|
||||
|
|
|
@ -17,7 +17,7 @@ class NetworkLocationsList extends PureComponent {
|
|||
static get propTypes() {
|
||||
return {
|
||||
dispatch: PropTypes.func.isRequired,
|
||||
networkLocations: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
networkLocations: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,8 @@ class NetworkLocationsList extends PureComponent {
|
|||
this.props.networkLocations.map(location =>
|
||||
dom.li(
|
||||
{
|
||||
className: "connect-page__network-location js-network-location"
|
||||
className: "connect-page__network-location js-network-location",
|
||||
key: location,
|
||||
},
|
||||
dom.span(
|
||||
{
|
||||
|
|
|
@ -45,12 +45,12 @@ class ExtensionDetail extends PureComponent {
|
|||
uuid,
|
||||
Localized(
|
||||
{
|
||||
id: "about-debugging-extension-manifest-link"
|
||||
id: "about-debugging-extension-manifest-link",
|
||||
key: "manifest",
|
||||
},
|
||||
dom.a(
|
||||
{
|
||||
className: "extension-detail__manifest",
|
||||
key: "manifest",
|
||||
href: manifestURL,
|
||||
target: "_blank",
|
||||
},
|
||||
|
|
|
@ -24,8 +24,8 @@ class Sidebar extends PureComponent {
|
|||
static get propTypes() {
|
||||
return {
|
||||
dispatch: PropTypes.func.isRequired,
|
||||
runtimes: PropTypes.array.isRequired,
|
||||
selectedPage: PropTypes.string.isRequired,
|
||||
runtimes: PropTypes.object.isRequired,
|
||||
selectedPage: PropTypes.string,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -61,20 +61,24 @@ class Sidebar extends PureComponent {
|
|||
dispatch,
|
||||
icon: GLOBE_ICON,
|
||||
isSelected: selectedPage === pageId,
|
||||
key: pageId,
|
||||
name: runtime.id,
|
||||
runtimeId: runtime.id,
|
||||
selectable: runtimeHasClient,
|
||||
});
|
||||
}),
|
||||
...runtimes.usbRuntimes.map(runtime =>
|
||||
SidebarItem({
|
||||
id: `usb-${ runtime.id }`,
|
||||
...runtimes.usbRuntimes.map(runtime => {
|
||||
const pageId = "usb-" + runtime.id;
|
||||
return SidebarItem({
|
||||
id: pageId,
|
||||
dispatch,
|
||||
icon: USB_ICON,
|
||||
isSelected: false,
|
||||
key: pageId,
|
||||
name: runtime.name,
|
||||
selectable: false,
|
||||
})),
|
||||
});
|
||||
}),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ class SidebarItem extends PureComponent {
|
|||
name: PropTypes.string.isRequired,
|
||||
runtimeId: PropTypes.string,
|
||||
selectable: PropTypes.bool.isRequired,
|
||||
type: PropTypes.string.isRequired,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче