From eea121e30cc5435d62a8deed12bec5031b49e81a Mon Sep 17 00:00:00 2001 From: Soxasora Date: Sun, 17 Nov 2024 16:48:42 +0100 Subject: [PATCH] feat: pull-to-refresh for PWA without native refresh --- components/layout.js | 23 +++---- components/pull-to-refresh.js | 86 +++++++++++++++++++++++++++ components/pull-to-refresh.module.css | 21 +++++++ 3 files changed, 120 insertions(+), 10 deletions(-) create mode 100644 components/pull-to-refresh.js create mode 100644 components/pull-to-refresh.module.css diff --git a/components/layout.js b/components/layout.js index f41e6397..15619e02 100644 --- a/components/layout.js +++ b/components/layout.js @@ -6,6 +6,7 @@ import Footer from './footer' import Seo, { SeoSearch } from './seo' import Search from './search' import styles from './layout.module.css' +import PullToRefresh from './pull-to-refresh' export default function Layout ({ sub, contain = true, footer = true, footerLinks = true, @@ -14,16 +15,18 @@ export default function Layout ({ return ( <> {seo && } - - {contain - ? ( - - {children} - - ) - : children} - {footer &&