From 0d632a8eb2206399e01d7c19fb0f61b7debc70b3 Mon Sep 17 00:00:00 2001 From: Yasuaki Uechi Date: Thu, 30 Jul 2020 13:47:28 +0900 Subject: [PATCH] feat: refine footer --- src/App.tsx | 195 ++-------------------- src/components/Footer.tsx | 225 +++++++++++++++++++------- src/pages/Home.tsx | 26 +++ src/pages/Search.tsx | 116 +++++++++++++ src/theme/index.tsx | 53 ++++++ src/util/{hooks.ts => hooks.tsx} | 16 +- {src/types => types}/react-tippy.d.ts | 0 7 files changed, 387 insertions(+), 244 deletions(-) create mode 100644 src/pages/Home.tsx create mode 100644 src/pages/Search.tsx create mode 100644 src/theme/index.tsx rename src/util/{hooks.ts => hooks.tsx} (58%) rename {src/types => types}/react-tippy.d.ts (100%) diff --git a/src/App.tsx b/src/App.tsx index 1e542bc..e67362a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,206 +1,35 @@ -import Tooltip from 'rc-tooltip'; import React from 'react'; -import { Helmet } from 'react-helmet'; -import { useTranslation } from 'react-i18next'; -import { IoIosFlash, IoIosRocket } from 'react-icons/io'; -import { Redirect, Route, Switch, useParams } from 'react-router-dom'; -import styled, { createGlobalStyle } from 'styled-components'; -import Cards from './components/cards'; -import { - AvailableIcon, - COLORS as ResultColor, - ResultIcon, - ResultItem, - ResultName, -} from './components/cards/core'; +import { Redirect, Route, Switch } from 'react-router-dom'; import Footer from './components/Footer'; -import Form from './components/Form'; -import Welcome from './components/Welcome'; -import { useStoreState } from './store'; -import { mobile } from './util/css'; +import Home from './pages/Home'; +import Search from './pages/Search'; +import { GlobalStyle } from './theme'; +import { useOpenSearch } from './util/hooks'; import { isStandalone } from './util/pwa'; -import { sanitize } from './util/text'; export default function App() { + const OpenSearch = useOpenSearch('/opensearch.xml'); + return ( <> - - - + + + + + {!isStandalone() &&