Skip to content
Snippets Groups Projects
Commit d0d2f07e authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

removed eslint from deps, updated eslint config and fixed files

parent 3f980c0a
No related branches found
No related tags found
1 merge request!19fix type imports
module.exports = {
extends: ['airbnb-typescript'],
extends: ['airbnb-typescript', 'prettier'],
parserOptions: {
project: './tsconfig.json',
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -16,8 +16,8 @@ const NewsContainer: React.FC = () => {
<CircularProgress />
) : (
<Grid container spacing={2}>
{data
&& data.map((item) => (
{data &&
data.map((item) => (
<News
title={item.title}
author="Anonymus"
......
......@@ -10,6 +10,7 @@ interface ICustomModalProps {
children: React.ReactNode;
customStyle: {
backgroundColor?: string;
margin?: string;
padding?: string;
width?: string;
border?: string;
......@@ -43,7 +44,7 @@ const useStyles = makeStyles((theme) => ({
}),
}));
export const CustomModal = ({
export const CustomModal: React.FC<ICustomModalProps> = ({
isOpen,
setIsOpen,
customStyle = {},
......@@ -51,7 +52,7 @@ export const CustomModal = ({
}: ICustomModalProps) => {
const classes = useStyles(customStyle);
const handleClose = () => {
const handleClose = (): void => {
setIsOpen(false);
};
......
import React from 'react';
import { Route, Switch } from 'react-router';
import NewsPage from '../../components/NewsPage';
import ProfileButton from './ProfileButton';
const MainRouting: React.FC = () => (
<Switch>
......
......@@ -2,7 +2,7 @@ import { Button } from '@material-ui/core';
import React, { useState } from 'react';
import { ProfileModal } from './ProfileModal';
export const ProfileButton = () => {
const ProfileButton: React.FC = () => {
const [isProfileModalOpen, setIsProfileModalOpen] = useState<boolean>(true);
const handleProfileModalOpen = () => {
......
......@@ -11,8 +11,8 @@ interface IProfileModalProps {
setIsOpen: Dispatcher<boolean>;
}
export const ProfileModal = ({ isOpen, setIsOpen }: IProfileModalProps) => {
const onClose = () => {
export const ProfileModal: React.FC<IProfileModalProps> = ({ isOpen, setIsOpen }) => {
const onClose = (): void => {
setIsOpen(false);
};
return (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment