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'],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
// node: {
// extensions: ['.js', '.jsx', '.ts', '.tsx'],
// },
typescript: {},
},
},
rules: {
@ -22,6 +23,7 @@ module.exports = {
'@typescript-eslint/indent': ['error', 2],
'comma-dangle': 0,
'no-restricted-syntax': 1,
'react/prop-types': 0,
'new-cap': 1,
'no-continue': 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 { Scroll } from "~/components/containers/Scroll";
import * as styles from "./styles.scss";
import classNames from "classnames";
import classNames from 'classnames';
import { Scroll } from '~/components/containers/Scroll';
import * as styles from './styles.scss';
interface IProps {
children: React.ReactChild;
title?: JSX.Element;
buttons?: JSX.Element;
size?: "medium" | "big";
size?: 'medium' | 'big';
width?: number;
error?: string;
@ -39,8 +39,8 @@ const ScrollDialog: FC<IProps> = ({
const onResize = useCallback(() => setHeight(window.innerHeight - 120), []);
useEffect(() => {
window.addEventListener("resize", onResize);
return () => window.removeEventListener("resize", onResize);
window.addEventListener('resize', onResize);
return () => window.removeEventListener('resize', onResize);
}, []);
const onScroll = useCallback(
@ -71,13 +71,13 @@ const ScrollDialog: FC<IProps> = ({
<div
className={styles.overlay}
onClick={onOverlayClick}
style={{ cursor: onOverlayClick ? "pointer" : "" }}
style={{ cursor: onOverlayClick ? 'pointer' : '' }}
/>
{!!title && (
<div className={styles.top}>
<div className={styles.wrap} style={{ flexBasis: width }}>
{ onClose && <div className={styles.close} onClick={onClose}/> }
{onClose && <div className={styles.close} onClick={onClose} />}
<div className={styles.pan}>
{title}
@ -92,7 +92,7 @@ const ScrollDialog: FC<IProps> = ({
{!title && (
<div className={styles.top}>
<div className={styles.wrap} style={{ flexBasis: width }}>
{ onClose && <div className={styles.close} onClick={onClose}/> }
{onClose && <div className={styles.close} onClick={onClose} />}
<div className={styles.top_cap} />
</div>
@ -112,7 +112,7 @@ const ScrollDialog: FC<IProps> = ({
<div
className={styles.scroll_wrap}
style={{ flexBasis: width + 40 }}
// style={{ flexBasis: width }}
// style={{ flexBasis: width }}
>
<Scroll
className="dialog_scroll"