1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

added upload sagas (failed)

This commit is contained in:
muerwre 2019-08-07 14:28:43 +07:00
parent 42fbacdd66
commit caf85c104f
2 changed files with 16 additions and 14 deletions

View file

@ -11,9 +11,10 @@ module.exports = {
plugins: ['@typescript-eslint', 'react', 'jsx-a11y', 'import', 'react-hooks'], plugins: ['@typescript-eslint', 'react', 'jsx-a11y', 'import', 'react-hooks'],
settings: { settings: {
'import/resolver': { 'import/resolver': {
node: { // node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'], // extensions: ['.js', '.jsx', '.ts', '.tsx'],
}, // },
typescript: {},
}, },
}, },
rules: { rules: {
@ -22,6 +23,7 @@ module.exports = {
'@typescript-eslint/indent': ['error', 2], '@typescript-eslint/indent': ['error', 2],
'comma-dangle': 0, 'comma-dangle': 0,
'no-restricted-syntax': 1, 'no-restricted-syntax': 1,
'react/prop-types': 0,
'new-cap': 1, 'new-cap': 1,
'no-continue': 1, 'no-continue': 1,
'no-underscore-dangle': 1, 'no-underscore-dangle': 1,

View file

@ -1,14 +1,14 @@
import React, { FC, MouseEventHandler, ReactChild, useCallback, useEffect, useState } from "react"; import React, { FC, MouseEventHandler, ReactChild, useCallback, useEffect, useState } from 'react';
// import { DialogPanel } from '~/components/panels/DialogPanel'; // import { DialogPanel } from '~/components/panels/DialogPanel';
import { Scroll } from "~/components/containers/Scroll"; import classNames from 'classnames';
import * as styles from "./styles.scss"; import { Scroll } from '~/components/containers/Scroll';
import classNames from "classnames"; import * as styles from './styles.scss';
interface IProps { interface IProps {
children: React.ReactChild; children: React.ReactChild;
title?: JSX.Element; title?: JSX.Element;
buttons?: JSX.Element; buttons?: JSX.Element;
size?: "medium" | "big"; size?: 'medium' | 'big';
width?: number; width?: number;
error?: string; error?: string;
@ -39,8 +39,8 @@ const ScrollDialog: FC<IProps> = ({
const onResize = useCallback(() => setHeight(window.innerHeight - 120), []); const onResize = useCallback(() => setHeight(window.innerHeight - 120), []);
useEffect(() => { useEffect(() => {
window.addEventListener("resize", onResize); window.addEventListener('resize', onResize);
return () => window.removeEventListener("resize", onResize); return () => window.removeEventListener('resize', onResize);
}, []); }, []);
const onScroll = useCallback( const onScroll = useCallback(
@ -71,7 +71,7 @@ const ScrollDialog: FC<IProps> = ({
<div <div
className={styles.overlay} className={styles.overlay}
onClick={onOverlayClick} onClick={onOverlayClick}
style={{ cursor: onOverlayClick ? "pointer" : "" }} style={{ cursor: onOverlayClick ? 'pointer' : '' }}
/> />
{!!title && ( {!!title && (