1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 21:06:42 +07:00

fixed eslint warnings

This commit is contained in:
Fedor Katurov 2022-01-07 19:06:57 +07:00
parent 58fa40dd5c
commit ba2e610e01
16 changed files with 82 additions and 585 deletions

View file

@ -1,4 +1,4 @@
import * as React from "react";
import * as React from 'react';
interface IGodRaysProps {
raised?: boolean;
@ -30,7 +30,7 @@ export class GodRays extends React.Component<IGodRaysProps> {
return setTimeout(() => window.requestAnimationFrame(this.draw), 500);
}
const { width, height, rays, particles } = this.state;
const { width, height, rays } = this.state;
const ctx = this.canvas.getContext('2d');
@ -42,7 +42,7 @@ export class GodRays extends React.Component<IGodRaysProps> {
ctx.clearRect(0, 0, width, height + 100); // clear canvas
ctx.save();
rays.map(({ angle, iterator, weight, speed, pulsar, opacity }, index) => {
rays.forEach(({ angle, iterator, weight, speed, pulsar, opacity }, index) => {
const gradient = ctx.createLinearGradient(0, 0, 0, height * 1.3);
gradient.addColorStop(0.2, `rgba(160, 255, 60, ${opacity * 0.1})`);
gradient.addColorStop(1, 'rgba(160, 255, 60, 0)');

View file

@ -1,21 +1,20 @@
import React, { FC, useCallback, useEffect, useState } from "react";
import classNames from "classnames";
import styles from "./styles.module.scss";
import { Group } from "~/components/containers/Group";
import React, { FC, useCallback, useEffect, useState } from 'react';
import classNames from 'classnames';
import styles from './styles.module.scss';
import { Group } from '~/components/containers/Group';
interface IProps {
}
interface IProps {}
export const SidePane: FC<IProps> = ({
}) => {
export const SidePane: FC<IProps> = () => {
const content_width = 1100;
const [left, setLeft] = useState(0);
const moveThis = useCallback(() => {
const { width } = document.body.getBoundingClientRect();
const shift = width > (content_width + 64 + 20)
? ((width - content_width - 64 - 20) / 2) - 54 + 64 // + content_width + 74
: 10;
const shift =
width > content_width + 64 + 20
? (width - content_width - 64 - 20) / 2 - 54 + 64 // + content_width + 74
: 10;
setLeft(shift);
}, [setLeft]);
@ -34,15 +33,17 @@ export const SidePane: FC<IProps> = ({
return (
<div className={styles.pane} style={{ transform: `translate(${left}px, 0px)` }}>
<Group>
<div
className={classNames(styles.group, 'logo')}
>
<div className={classNames(styles.group, 'logo')}>
<div>V</div>
</div>
<div className={styles.btn}><div>P</div></div>
<div className={styles.btn}>
<div>P</div>
</div>
<div className={styles.btn}><div>F</div></div>
<div className={styles.btn}>
<div>F</div>
</div>
<div className={styles.group}>
<div className={styles.btn} />