diff --git a/.eslintrc.json b/.eslintrc.json index 87a9a242..277e9223 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,7 +2,9 @@ "extends": [ "next/core-web-vitals", "prettier", - "plugin:storybook/recommended" + "plugin:storybook/recommended", + "eslint:recommended", + "plugin:react/jsx-runtime" ], "rules": { "@next/next/no-img-element": "off" diff --git a/src/components/atoms/Button/index.tsx b/src/components/atoms/Button/index.tsx index 87910dea..cff237f3 100644 --- a/src/components/atoms/Button/index.tsx +++ b/src/components/atoms/Button/index.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { ButtonBase, Typography } from '@mui/material' import { Colors } from 'src/styles/color' diff --git a/src/components/atoms/IconTwitter/IconTwitter.stories.tsx b/src/components/atoms/IconTwitter/IconTwitter.stories.tsx index ce205915..91e683f2 100644 --- a/src/components/atoms/IconTwitter/IconTwitter.stories.tsx +++ b/src/components/atoms/IconTwitter/IconTwitter.stories.tsx @@ -6,6 +6,6 @@ const meta: ComponentMeta = { } export default meta -const Template: ComponentStory = args => +const Template: ComponentStory = () => export const Default = Template.bind({}) diff --git a/src/components/atoms/IconTwitter/index.tsx b/src/components/atoms/IconTwitter/index.tsx index 15830f3a..c862c16a 100644 --- a/src/components/atoms/IconTwitter/index.tsx +++ b/src/components/atoms/IconTwitter/index.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { SvgIcon } from '@mui/material' import { Colors } from 'src/styles/color' diff --git a/src/components/atoms/Link/index.tsx b/src/components/atoms/Link/index.tsx index 35ef536a..e0b31777 100644 --- a/src/components/atoms/Link/index.tsx +++ b/src/components/atoms/Link/index.tsx @@ -1,10 +1,11 @@ import NextLink, { LinkProps as NextLinkProps } from 'next/link' import MuiLink from '@mui/material/Link' +import { ReactNode } from 'react' export interface LinkProps { href: NextLinkProps['href'] target?: string - children?: React.ReactNode + children?: ReactNode } export const Link = ({ href, target = '_self', children }: LinkProps) => { diff --git a/src/components/atoms/Logo/index.tsx b/src/components/atoms/Logo/index.tsx index 12f09bd4..2fc6ba8b 100644 --- a/src/components/atoms/Logo/index.tsx +++ b/src/components/atoms/Logo/index.tsx @@ -1,5 +1,3 @@ -import React from 'react' - import { SvgIcon, SvgIconProps } from '@mui/material' export const Logo = (props: SvgIconProps) => { diff --git a/src/components/commons/Layout/index.tsx b/src/components/commons/Layout/index.tsx index 3fa92d43..208154fd 100644 --- a/src/components/commons/Layout/index.tsx +++ b/src/components/commons/Layout/index.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next' -import { ReactNode } from 'react' +import { ReactNode, ChangeEvent } from 'react' import Head from 'next/head' import { Header } from 'src/components/organisms' @@ -17,7 +17,7 @@ export const Layout: NextPage = ({ children }) => { const config = require('../../../../next.config') const [authorized, setAuthorized] = useLocalStorageState('authorized', { defaultValue: false }) - const handleChange = (e: React.ChangeEvent) => { + const handleChange = (e: ChangeEvent) => { if (toSha256(e.target.value) === process.env.NEXT_PUBLIC_AUTH_PASSWORD_HASH) setAuthorized(true) } diff --git a/src/components/molecules/HeaderMenu/index.tsx b/src/components/molecules/HeaderMenu/index.tsx index 5e176a29..a651eecb 100644 --- a/src/components/molecules/HeaderMenu/index.tsx +++ b/src/components/molecules/HeaderMenu/index.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { Typography, Box } from '@mui/material' import { useRouter } from 'next/router' import { HeaderItemColor, HeaderMenuItem, HeaderItemBehaviorStyles } from 'src/components/organisms/Header' diff --git a/src/components/organisms/Footer/FooterBottom.tsx b/src/components/organisms/Footer/FooterBottom.tsx index e6d9bc37..49cf6f7d 100644 --- a/src/components/organisms/Footer/FooterBottom.tsx +++ b/src/components/organisms/Footer/FooterBottom.tsx @@ -1,8 +1,9 @@ import { Box } from '@mui/material' import { useSize } from 'src/modules/hooks' +import { ReactNode } from 'react' interface FooterBottomProps { - children: React.ReactNode + children: ReactNode } export const FooterBottom = ({ children }: FooterBottomProps) => { diff --git a/src/components/organisms/Header/index.tsx b/src/components/organisms/Header/index.tsx index 65a2e118..97a857ac 100644 --- a/src/components/organisms/Header/index.tsx +++ b/src/components/organisms/Header/index.tsx @@ -1,4 +1,4 @@ -import React, { useState, useMemo } from 'react' +import { useState, useMemo } from 'react' import MenuRoundedIcon from '@mui/icons-material/MenuRounded' import { AppBar, Toolbar, Box, IconButton } from '@mui/material' import { Colors } from 'src/styles/color' diff --git a/src/components/organisms/SpeakersSection/index.tsx b/src/components/organisms/SpeakersSection/index.tsx index a9652ad3..0ac53208 100644 --- a/src/components/organisms/SpeakersSection/index.tsx +++ b/src/components/organisms/SpeakersSection/index.tsx @@ -3,20 +3,10 @@ import Link from 'next/link' import { Box, Typography } from '@mui/material' import { Button } from 'src/components/atoms' import { useTranslation } from 'react-i18next' -import { Colors, confettiColors } from 'src/styles/color' -import { useSize } from 'src/modules/hooks' -import { useReward } from 'react-rewards' +import { Colors } from 'src/styles/color' export const SpeakersSection: FC = () => { const { t } = useTranslation() - const { isTabletOrOver } = useSize() - const { reward } = useReward('confettiGopherPopper', 'confetti', { - angle: 135, - colors: confettiColors, - position: 'absolute', - startVelocity: 20 - }) - return ( { - const { t } = useTranslation() - // TODO(@maito1201): 取得したデータを基にセッションデータを表示する // const { data } = useSessionize() // console.log('session data', data) @@ -16,7 +13,6 @@ export const PageTop: NextPage = () => { - ) } diff --git a/src/pages/floor_guide.tsx b/src/pages/floor_guide.tsx index 797c0108..4b5b47c7 100644 --- a/src/pages/floor_guide.tsx +++ b/src/pages/floor_guide.tsx @@ -1,9 +1,6 @@ import { PageTop } from 'src/components/pages' -type InitialProps = {} -type Props = {} & InitialProps - -const Index = (_: Props) => { +const Index = () => { /* TODO: 各ページの実装 */ return } diff --git a/src/pages/index.tsx b/src/pages/index.tsx index c5a5d69f..c2cb816c 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,9 +1,6 @@ import { PageTop } from 'src/components/pages' -type InitialProps = {} -type Props = {} & InitialProps - -const Index = (_: Props) => { +const Index = () => { return } diff --git a/src/pages/sessions.tsx b/src/pages/sessions.tsx index 797c0108..4b5b47c7 100644 --- a/src/pages/sessions.tsx +++ b/src/pages/sessions.tsx @@ -1,9 +1,6 @@ import { PageTop } from 'src/components/pages' -type InitialProps = {} -type Props = {} & InitialProps - -const Index = (_: Props) => { +const Index = () => { /* TODO: 各ページの実装 */ return } diff --git a/src/pages/timetable.tsx b/src/pages/timetable.tsx index 797c0108..4b5b47c7 100644 --- a/src/pages/timetable.tsx +++ b/src/pages/timetable.tsx @@ -1,9 +1,6 @@ import { PageTop } from 'src/components/pages' -type InitialProps = {} -type Props = {} & InitialProps - -const Index = (_: Props) => { +const Index = () => { /* TODO: 各ページの実装 */ return }