From d5100b31e232825abfa15fba3a92159affd51612 Mon Sep 17 00:00:00 2001 From: Takanori Oishi Date: Tue, 15 Dec 2020 20:04:04 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Types=E3=81=AE=E5=BB=83=E6=AD=A2=20Fixes?= =?UTF-8?q?=20#160?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/sections/Hello.tsx | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/components/sections/Hello.tsx b/src/components/sections/Hello.tsx index 87cf1828..e685d460 100644 --- a/src/components/sections/Hello.tsx +++ b/src/components/sections/Hello.tsx @@ -1,7 +1,6 @@ -import React, { useEffect, useRef } from 'react'; +import React from 'react'; import { graphql, useStaticQuery } from 'gatsby'; import { useI18next } from 'gatsby-plugin-react-i18next'; -import Typed, { TypedOptions } from 'typed.js'; import { Typography, Grid, Button, makeStyles } from '@material-ui/core'; import { Breakpoint } from '@material-ui/core/styles/createBreakpoints'; import { BicstoneIcon } from '../'; @@ -20,24 +19,6 @@ export const Hello: React.FC = () => { const { t, language } = useI18next(); const width = useBreakPoint(); const BUTTON_SMALL_WIDTH: Breakpoint[] = ['xs']; - const wrapEl = useRef(null); - useEffect(() => { - if (wrapEl.current) { - const options: TypedOptions = { - typeSpeed: 60, - showCursor: false, - autoInsertCss: false, - strings: [t('hello.title')], - }; - // @see https://github.com/mattboldt/typed.js/pull/461 - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore: Typedの型定義が誤っており、HTMLSpanElementは割当可能 - const typed = new Typed(wrapEl.current, options); - return () => { - typed.destroy(); - }; - } - }, [wrapEl.current]); const { allContentfulHello }: HelloDataQuery = useStaticQuery( graphql` query HelloData {