Skip to content

Commit

Permalink
eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MeetMichal committed Jan 7, 2024
1 parent 9601ee3 commit 1abc10d
Show file tree
Hide file tree
Showing 20 changed files with 29 additions and 72 deletions.
3 changes: 2 additions & 1 deletion React/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"test": "react-scripts test",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
"deploy": "gh-pages -d build",
"lint": "eslint src/**/*.ts src/**/*.tsx"
},
"eslintConfig": {
"extends": [
Expand Down
8 changes: 4 additions & 4 deletions React/public/data/StreamActivityHistogram.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NUMBER_OF_POSTS,AUTHORS_AMOUNT
1;101478
2-5;27404
5-25;16799
>25;9017
1,101478
2-5,27404
5-25,16799
>25,9017
2 changes: 1 addition & 1 deletion React/public/data/UserRegistrations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ DATE,L2_REGISTRATIONS,WEB3ID_MINTERS
2023-12-03,294587,45426
2023-12-10,296627,45921
2023-12-17,299071,46354
2024-01-07,306950,
2024-01-07,306950,47661
4 changes: 4 additions & 0 deletions React/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="title" content="Just Stats">
<meta name="description" content="Just Stats project centralizes access to different type of statistics" />
<meta property="og:title" content="Just Stats" />
<meta property="og:image" content="%PUBLIC_URL%/Michal.png" />
<meta name="twitter:card" content="%PUBLIC_URL%/Michal.png" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
Expand Down
7 changes: 2 additions & 5 deletions React/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import React, {useState} from 'react';
import { styled, useTheme } from '@mui/material/styles';
import React from 'react';
import { useTheme } from '@mui/material/styles';
import useMediaQuery from '@mui/material/useMediaQuery';
import { BrowserRouter as Router, Routes, Route, Link } from 'react-router-dom';

import './App.css';
import '@fontsource/roboto/300.css';
import '@fontsource/roboto/400.css';
import '@fontsource/roboto/500.css';
import '@fontsource/roboto/700.css';
import DeBankUsers from './pages/michal/DeBankUsers';
import Top100Users from './pages/nett/Top100Users';
import DesktopLayout from './DesktopLayout';
import MobileLayout from './MobileLayout';

Expand Down
4 changes: 1 addition & 3 deletions React/src/AppRoutes.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState} from 'react';
import React from 'react';
import { Route, Routes } from 'react-router-dom';
import DeBankUsers from './pages/michal/DeBankUsers';
import Top100Users from './pages/nett/Top100Users';
Expand All @@ -9,8 +9,6 @@ import TopDepositors from './pages/michal/TopDepositors';
import Snapshots from './pages/debank/Snapshots';
import WelcomePage from './pages/WelcomePage';

const drawerWidth = 200;

export default function AppRoutes() {
return (
<Routes>
Expand Down
13 changes: 1 addition & 12 deletions React/src/DesktopLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
import React, {useState} from 'react';
import React from 'react';
import Box from '@mui/material/Box';
import Drawer from '@mui/material/Drawer';
import AppBar from '@mui/material/AppBar';
import CssBaseline from '@mui/material/CssBaseline';
import Toolbar from '@mui/material/Toolbar';
import List from '@mui/material/List';
import Typography from '@mui/material/Typography';
import SvgIcon from '@mui/material/SvgIcon';
import ListItemButton from '@mui/material/ListItemButton';
import ListItemIcon from '@mui/material/ListItemIcon';
import ListItemText from '@mui/material/ListItemText';
import Collapse from '@mui/material/Collapse';
import ExpandLess from '@mui/icons-material/ExpandLess';
import ExpandMore from '@mui/icons-material/ExpandMore';
import { Route, Routes } from 'react-router-dom';
import DeBankUsers from './pages/michal/DeBankUsers';
import Top100Users from './pages/nett/Top100Users';
import Navigation from './Navigation';
import AppRoutes from './AppRoutes';

Expand Down
16 changes: 0 additions & 16 deletions React/src/MobileLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,17 @@
import React, {useState} from 'react';
import logo from './logo.svg';
import AppBar from '@mui/material/AppBar';
import Box from '@mui/material/Box';
import Drawer from '@mui/material/Drawer';
import SvgIcon from '@mui/material/SvgIcon';
import IconButton from '@mui/material/IconButton';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import ListItemButton from '@mui/material/ListItemButton';
import ListItemIcon from '@mui/material/ListItemIcon';
import ListItemText from '@mui/material/ListItemText';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typography';
import Collapse from '@mui/material/Collapse';
import ExpandLess from '@mui/icons-material/ExpandLess';
import ExpandMore from '@mui/icons-material/ExpandMore';
import InboxIcon from '@mui/icons-material/MoveToInbox';
import MenuIcon from '@mui/icons-material/Menu';
import { styled, useTheme } from '@mui/material/styles';
import useMediaQuery from '@mui/material/useMediaQuery';
import { BrowserRouter as Router, Routes, Route, Link } from 'react-router-dom';

import './App.css';
import '@fontsource/roboto/300.css';
import '@fontsource/roboto/400.css';
import '@fontsource/roboto/500.css';
import '@fontsource/roboto/700.css';
import DeBankUsers from './pages/michal/DeBankUsers';
import Top100Users from './pages/nett/Top100Users';
import Navigation from './Navigation';
import AppRoutes from './AppRoutes';

Expand Down
2 changes: 1 addition & 1 deletion React/src/pages/WelcomePage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Card, CardContent, CardHeader, Typography } from '@mui/material';
import React, {useState, useEffect} from 'react';
import React from 'react';


export default function Snapshots() {
Expand Down
16 changes: 5 additions & 11 deletions React/src/pages/debank/Snapshots.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
import React, {useState, useEffect} from 'react';
import AboutNett from '../../shared/AboutNett';
import { Box, Button, Grid, Typography } from '@mui/material';
import {getData} from "../../services/CsvUtils"
import {UserRank} from "../../models/UserRank"
import { DataGrid, GridColDef } from '@mui/x-data-grid';
import DownlaodIcon from '@mui/icons-material/FileDownload';
import { useTheme } from "@mui/material/styles";
import useMediaQuery from "@mui/material/useMediaQuery";
import React from 'react';
import { Grid } from '@mui/material';
import AboutDeBank from '../../shared/AboutDeBank';

export default function Snapshots() {
const theme = useTheme();
const isDesktop = useMediaQuery(theme.breakpoints.up('sm'));

return (
<Grid container rowSpacing={3} columnSpacing={3}>
<Grid item xs={12} >
<AboutDeBank />
</Grid>
<Grid item xs={12} >
Charts will be available in coming days
</Grid>
</Grid>
);
}
1 change: 0 additions & 1 deletion React/src/pages/michal/DeBankUsers.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Box from '@mui/material/Box';
import React, {useEffect, useState} from 'react';
import AboutMichal from '../../shared/AboutMichal';
import { Grid } from '@mui/material';
Expand Down
1 change: 0 additions & 1 deletion React/src/pages/michal/LuckyDraws.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Box from '@mui/material/Box';
import React, {useEffect, useState} from 'react';
import AboutMichal from '../../shared/AboutMichal';
import { LuckyDrawDailyStats } from '../../models/LuckyDrawDailyStats';
Expand Down
9 changes: 2 additions & 7 deletions React/src/pages/michal/RewardPools.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import Box from '@mui/material/Box';
import React, {useState, useEffect} from 'react';
import { RewardPoolDailyStats } from '../../models/RewardPoolDailyStats';
import { RewardPoolsPrizeHistogram } from '../../models/RewardPoolsPrizeHistogram';
import { RewardPoolsEarnersHistogram } from '../../models/RewardPoolsEarnersHistogram';
import AboutMichal from '../../shared/AboutMichal';
import { getData } from '../../services/CsvUtils';
import { Button, Grid, Typography } from '@mui/material';
import { Grid } from '@mui/material';
import {indigo, red} from '@mui/material/colors'
import DownlaodIcon from '@mui/icons-material/FileDownload'
import ImageIcon from '@mui/icons-material/Image'
import domtoimage from 'dom-to-image';
import fileDownload from "js-file-download";
import { Bar, BarChart, CartesianGrid, Legend, Line, LineChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
import { Bar, BarChart, CartesianGrid, Line, LineChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';
import moment from 'moment';
import ChartContainer from '../../shared/ChartContainer';

Expand Down
1 change: 0 additions & 1 deletion React/src/pages/michal/StreamActivity.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Box from '@mui/material/Box';
import React, {useEffect, useState} from 'react';
import AboutMichal from '../../shared/AboutMichal';
import { StreamActivityDailyStats } from '../../models/StreamActivityDailyStats';
Expand Down
1 change: 0 additions & 1 deletion React/src/pages/michal/TopDepositors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React, {useEffect, useState} from 'react';
import AboutMichal from '../../shared/AboutMichal';
import { Button, Grid, Typography, useMediaQuery, useTheme } from '@mui/material';
import { DataGrid, GridColDef } from '@mui/x-data-grid';
import { UserRank } from '../../models/UserRank';
import { getData } from '../../services/CsvUtils';
import DownlaodIcon from '@mui/icons-material/FileDownload';
import { UserSpendings } from '../../models/UserSpendings';
Expand Down
3 changes: 1 addition & 2 deletions React/src/pages/nett/Top100Users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { DataGrid, GridColDef } from '@mui/x-data-grid';
import DownlaodIcon from '@mui/icons-material/FileDownload';
import { useTheme } from "@mui/material/styles";
import useMediaQuery from "@mui/material/useMediaQuery";
import { LineChart, Line,CartesianGrid, ResponsiveContainer, Scatter, ScatterChart, Tooltip, XAxis, YAxis } from 'recharts';

export default function Top100Users() {
const [usersRank, setUsersRank] = useState<UserRank[]>([]);
Expand Down Expand Up @@ -65,7 +64,7 @@ export default function Top100Users() {
borderColor: 'grey.400'
}}
variant={isDesktop ? "h5" : "body1"}>
Top 100 users
Top 100 users (snapshot: 31.12.2023)
</Typography>
<DataGrid
sx={{
Expand Down
4 changes: 2 additions & 2 deletions React/src/shared/AboutDeBank.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState} from 'react';
import React from 'react';
import Card from '@mui/material/Card';
import CardActions from '@mui/material/CardActions';
import CardContent from '@mui/material/CardContent';
Expand All @@ -17,7 +17,7 @@ export default function AboutNett() {
/>
<CardContent>
<Typography variant="body2">
All snapshot data are available under link: <a>https://github.com/DeBankDeFi/web3-data</a>
All snapshot data are available under <a href="https://github.com/DeBankDeFi/web3-data">LINK</a>
</Typography>
</CardContent>
<CardActions>
Expand Down
2 changes: 1 addition & 1 deletion React/src/shared/AboutMichal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState} from 'react';
import React from 'react';
import Card from '@mui/material/Card';
import CardActions from '@mui/material/CardActions';
import CardContent from '@mui/material/CardContent';
Expand Down
2 changes: 1 addition & 1 deletion React/src/shared/AboutNett.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState} from 'react';
import React from 'react';
import Card from '@mui/material/Card';
import CardActions from '@mui/material/CardActions';
import CardContent from '@mui/material/CardContent';
Expand Down
2 changes: 1 addition & 1 deletion React/src/shared/ChartContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState, useEffect, Children, PropsWithChildren} from 'react';
import React, {PropsWithChildren} from 'react';
import { Button, Grid, IconButton, Modal, Typography, useMediaQuery, useTheme } from '@mui/material';
import Box from '@mui/material/Box';
import DownlaodIcon from '@mui/icons-material/FileDownload'
Expand Down

0 comments on commit 1abc10d

Please sign in to comment.