From d856caadde13a66c525d585859f41503dfced6e8 Mon Sep 17 00:00:00 2001 From: Yasuaki Uechi Date: Fri, 2 Aug 2019 04:23:21 +0900 Subject: [PATCH] feat: PWA --- web/public/index.html | 7 ++---- web/public/manifest.json | 2 +- web/src/App.js | 42 +++++++++++++++++------------------ web/src/components/Cards.js | 6 ++--- web/src/components/Welcome.js | 8 +------ web/src/index.js | 4 ++-- web/src/util/pwa.js | 3 +++ 7 files changed, 32 insertions(+), 40 deletions(-) create mode 100644 web/src/util/pwa.js diff --git a/web/public/index.html b/web/public/index.html index dc0973a..5903d33 100644 --- a/web/public/index.html +++ b/web/public/index.html @@ -10,12 +10,8 @@ /> - - + @@ -42,6 +38,7 @@ href="%PUBLIC_URL%/safari-pinned-tab.svg" color="#5180fc" /> + namae — name new project diff --git a/web/public/manifest.json b/web/public/manifest.json index 7c47822..db342db 100644 --- a/web/public/manifest.json +++ b/web/public/manifest.json @@ -1,6 +1,6 @@ { "short_name": "namae", - "name": "namae.dev", + "name": "namae", "icons": [ { "src": "favicon.ico", diff --git a/web/src/App.js b/web/src/App.js index 05cae8d..1c5a98a 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -3,11 +3,10 @@ import styled, { createGlobalStyle } from 'styled-components' import { useDeferredState } from './hooks/state' import { mobile } from './util/css' - +import { isStandalone } from './util/pwa' import Welcome from './components/Welcome' import Footer from './components/Footer' import { Cards, CardContainer } from './components/Cards' - import GithubCard from './components/cards/GithubCard' import DomainCard from './components/cards/DomainCard' import HomebrewCard from './components/cards/HomebrewCard' @@ -32,14 +31,13 @@ export default function App() { return ( <> +
+ + namæ + + +
-
- - namæ - - -
- {queryGiven ? ( @@ -56,10 +54,10 @@ export default function App() { - ) : ( + ) : !isStandalone() ? ( - )} -