From f99e0aba70efad0deb907d8e27f09fc9f527c8a4 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 17 Feb 2023 17:07:50 +0700 Subject: Refactor --- src/pages/_app.jsx | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/pages/_app.jsx (limited to 'src/pages/_app.jsx') diff --git a/src/pages/_app.jsx b/src/pages/_app.jsx new file mode 100644 index 00000000..33573480 --- /dev/null +++ b/src/pages/_app.jsx @@ -0,0 +1,36 @@ +import '../styles/globals.css' +import NextProgress from 'next-progress' +import { useRouter } from 'next/router' +import { AnimatePresence } from 'framer-motion' +import { Toaster } from "react-hot-toast" +import { QueryClient, QueryClientProvider } from 'react-query' + +const queryClient = new QueryClient() + +function MyApp({ Component, pageProps }) { + const router = useRouter() + + return ( + <> + + + + window.scrollTo(0, 0)} + > + + + + + ) +} + +export default MyApp -- cgit v1.2.3 From f66b12fd1d0b83af0d7230d7b1565fbe00afbe3c Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 22 Feb 2023 11:03:34 +0700 Subject: prettier --- src/pages/_app.jsx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/pages/_app.jsx') diff --git a/src/pages/_app.jsx b/src/pages/_app.jsx index 33573480..0110576a 100644 --- a/src/pages/_app.jsx +++ b/src/pages/_app.jsx @@ -2,7 +2,7 @@ import '../styles/globals.css' import NextProgress from 'next-progress' import { useRouter } from 'next/router' import { AnimatePresence } from 'framer-motion' -import { Toaster } from "react-hot-toast" +import { Toaster } from 'react-hot-toast' import { QueryClient, QueryClientProvider } from 'react-query' const queryClient = new QueryClient() @@ -13,19 +13,15 @@ function MyApp({ Component, pageProps }) { return ( <> - + - window.scrollTo(0, 0)} - > + window.scrollTo(0, 0)}> -- cgit v1.2.3 From ac3fdf7be9982e65d8f83a20bc487f8dd62e3bfc Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 22 Feb 2023 23:36:47 +0700 Subject: fix --- src/pages/_app.jsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/pages/_app.jsx') diff --git a/src/pages/_app.jsx b/src/pages/_app.jsx index 0110576a..e32efc19 100644 --- a/src/pages/_app.jsx +++ b/src/pages/_app.jsx @@ -19,10 +19,20 @@ function MyApp({ Component, pageProps }) { className: 'border border-gray_r-8' }} /> - + - window.scrollTo(0, 0)}> - + window.scrollTo(0, 0)} + > + -- cgit v1.2.3