Unverified Commit ce763e09 authored by Andrey Azov's avatar Andrey Azov Committed by GitHub

Fix lint errors (#346)

parent a2ec5172
Pipeline #97963 passed with stages
in 7 minutes and 17 seconds
......@@ -20,15 +20,18 @@ import { ActionCreator, Action } from 'redux';
import findIndex from 'lodash/findIndex';
import set from 'lodash/set';
import { RootState } from 'src/store';
import { orthologueSpecies as sampleOrthologueSpecies } from 'src/content/app/custom-download/sample-data/orthologue';
import attributes from 'src/content/app/custom-download/sample-data/attributes';
import { AttributeWithOptions } from 'src/content/app/custom-download/types/Attributes';
import { updateActiveConfigurationForGenome } from 'src/content/app/custom-download/state/customDownloadActions';
import {
Attributes,
AttributeWithOptions
} from 'src/content/app/custom-download/types/Attributes';
import JSONValue from 'src/shared/types/JSON';
import { CheckboxGridOption } from 'src/content/app/custom-download/components/checkbox-grid/CheckboxGrid';
import Species from 'src/content/app/custom-download/types/Species';
import { updateActiveConfigurationForGenome } from 'src/content/app/custom-download/state/customDownloadActions';
import { RootState } from 'src/store';
import {
getCustomDownloadActiveGenomeId,
......@@ -39,7 +42,7 @@ export const setAttributes = createAsyncAction(
'custom-download/set-attributes-request',
'custom-download/set-attributes-success',
'custom-download/set-attributes-failure'
)<undefined, {}, Error>();
)<undefined, Attributes, Error>();
export const fetchAttributes: ActionCreator<ThunkAction<
void,
......
......@@ -129,7 +129,7 @@ export const setPreviewResult = createAsyncAction(
'custom-download/preview-results-request',
'custom-download/preview-results-success',
'custom-download/preview-results-failure'
)<{ endpointURL: string; headers: {} }, JSONValue, Error>();
)<undefined, JSONValue, Error>();
export const fetchPreviewResult: ActionCreator<ThunkAction<
void,
......
......@@ -22,14 +22,10 @@ import { getAccountExpanded } from '../headerSelectors';
import styles from './Account.scss';
type StateProps = {
type AccountProps = {
accountExpanded: boolean;
};
type OwnProps = {};
type AccountProps = StateProps & OwnProps;
export const Account = (props: AccountProps) => {
return props.accountExpanded ? (
<div className={styles.account}>
......@@ -38,7 +34,7 @@ export const Account = (props: AccountProps) => {
) : null;
};
const mapStateToProps = (state: RootState): StateProps => ({
const mapStateToProps = (state: RootState) => ({
accountExpanded: getAccountExpanded(state)
});
......
......@@ -28,17 +28,11 @@ import { Status } from 'src/shared/types/status';
import styles from './HeaderButtons.scss';
type StateProps = {};
type DispatchProps = {
type HeaderButtonsProps = {
toggleLaunchbar: () => void;
toggleAccount: () => void;
};
type OwnProps = {};
type HeaderButtonsProps = StateProps & DispatchProps & OwnProps;
export const HeaderButtons: FunctionComponent<HeaderButtonsProps> = (props) => (
<div>
<ImageButton
......@@ -59,11 +53,9 @@ export const HeaderButtons: FunctionComponent<HeaderButtonsProps> = (props) => (
</div>
);
const mapStateToProps = (): StateProps => ({});
const mapDispatchToProps: DispatchProps = {
const mapDispatchToProps = {
toggleAccount,
toggleLaunchbar
};
export default connect(mapStateToProps, mapDispatchToProps)(HeaderButtons);
export default connect(null, mapDispatchToProps)(HeaderButtons);
......@@ -26,21 +26,17 @@ import { getLaunchbarExpanded } from '../headerSelectors';
import { RootState } from 'src/store';
import { CommittedItem } from 'src/content/app/species-selector/types/species-search';
type StateProps = {
type LaunchbarContainerProps = {
launchbarExpanded: boolean;
committedSpecies: CommittedItem[];
};
type OwnProps = {};
type LaunchbarContainerProps = StateProps & OwnProps;
export const LaunchbarContainer = memo(
(props: LaunchbarContainerProps) => <Launchbar {...props} />,
isEqual
);
const mapStateToProps = (state: RootState): StateProps => ({
const mapStateToProps = (state: RootState) => ({
launchbarExpanded: getLaunchbarExpanded(state),
committedSpecies: getEnabledCommittedSpecies(state)
});
......
......@@ -14,15 +14,7 @@
* limitations under the License.
*/
declare global {
interface Window {
nodeEnv: string | undefined;
}
}
export function registerSW() {
window.nodeEnv = process.env.NODE_ENV;
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment