diff --git a/src/app/@auth/layout.tsx b/src/app/@auth/layout.tsx index 61875f3..63d7932 100644 --- a/src/app/@auth/layout.tsx +++ b/src/app/@auth/layout.tsx @@ -2,6 +2,7 @@ import SheetLayout from '@/app/components/Layouts/SheetLayout'; import { Metadata } from 'next'; import * as React from 'react'; +import TransitionLayout from '../components/Layouts/TransitionLayout'; export default function ComponentsLayout({ children, @@ -10,7 +11,9 @@ export default function ComponentsLayout({ }) { return ( <> - {children} + + {children} + ); } diff --git a/src/app/@auth/template.tsx b/src/app/@auth/template.tsx new file mode 100644 index 0000000..c3c6e37 --- /dev/null +++ b/src/app/@auth/template.tsx @@ -0,0 +1,5 @@ +// File: template.js +import React from 'react'; +export default function Template({ children }: { children: React.ReactNode }) { + return
{children}
; +} diff --git a/src/app/components/Layouts/TransitionLayout.tsx b/src/app/components/Layouts/TransitionLayout.tsx new file mode 100644 index 0000000..3c9d36f --- /dev/null +++ b/src/app/components/Layouts/TransitionLayout.tsx @@ -0,0 +1,19 @@ +'use client'; + +import { motion } from 'framer-motion'; + +const TransitionLayout = ({ children }) => ( + + {children} + +); +export default TransitionLayout; diff --git a/src/app/components/Success/Success.tsx b/src/app/components/Success/Success.tsx index 02b38e3..088774b 100644 --- a/src/app/components/Success/Success.tsx +++ b/src/app/components/Success/Success.tsx @@ -59,25 +59,26 @@ export default function Success({ style={{ borderRadius: '40px', padding: '16px' }} className='bg-background inset fixed z-50 grid h-fit space-y-8 overflow-hidden rounded-t-[40px] border-t bg-opacity-100 ' > -
- - {transactionStatus && ( -
- +
+ {transactionStatus && ( +
+ +
+ )} + {loading && ( +
+
+
- )} - {loading && ( -
- -

- Your payment is on the way -

-
- )} - +

+ Your payment is on the way +

+
+ )}
diff --git a/src/app/home/page.tsx b/src/app/home/page.tsx index 3bd2f83..b317089 100644 --- a/src/app/home/page.tsx +++ b/src/app/home/page.tsx @@ -54,25 +54,15 @@ export default function Page() {
{ + /* onClick={() => { dispatch(setSheet(true)); - }} */ + }} */ href={{ pathname: '/menu', query: { isNavOpen: true }, }} > - - - { - dispatch(setSheet(true)); - }} */ - href={{ - pathname: '/embedded-wallet', - }} - > - go + router.push(`/menu?isNavOpen=true`)} />
diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 18fd86e..1f519e5 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -33,35 +33,8 @@ import { ZeroDevProvider } from '@zerodev/privy'; // privy import { PrivyProvider } from '@privy-io/react-auth'; -// !STARTERCONF Change these default meta -// !STARTERCONF Look at @/constant/config to change them -/* - -export const metadata: Metadata = { - title: 'PWA with Next 13', - description: 'PWA application with Next 13', - generator: 'Next.js', - manifest: '/manifest.json', - - keywords: ['nextjs', 'nextjs13', 'next13', 'pwa', 'next-pwa'], - themeColor: [{ media: '(prefers-color-scheme: dark)', color: '#fff' }], - authors: [ - { name: 'Rajesh Prajapati' }, - { - name: 'Rajesh Prajapati', - url: 'https://www.linkedin.com/in/raazeshp96/', - }, - ], - viewport: - 'minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no, viewport-fit=cover', - icons: [ - { rel: 'apple-touch-icon', url: 'icons/icon-128x128.png' }, - { rel: 'icon', url: 'icons/icon-128x128.png' }, - ], -}; */ - import bgimage from '../../public/images/Rectangle.png'; -import { LayoutGroup } from 'framer-motion'; +import { AnimatePresence, LayoutGroup } from 'framer-motion'; import { sepolia } from 'viem/chains'; export default function RootLayout({ @@ -76,33 +49,11 @@ export default function RootLayout({ drawer: React.ReactNode; }) { const queryClient = new QueryClient(); - const router = useRouter(); - const pathname = usePathname(); - /* const loginState = useSelector((state: RootState) => state.login.value); - - // Redirect to login if not authenticated - if (!loginState && pathname !== '/login') { - router.push('/login'); - return null; - } - console.log(loginState); - - - */ - console.log('layout'); - console.log( - 'NEXT_PUBLIC_PRIVY_APP_ID', - process.env.NEXT_PUBLIC_PRIVY_APP_ID as string - ); return ( - {/* */} Payments, Stephen Gordon @@ -187,11 +138,16 @@ export default function RootLayout({ - -
{auth}
-
{drawer}
- {/*
{transactionmodal}
*/} - {/*
+ window.scrollTo(0, 0)} + > + +
{auth}
+
{drawer}
+ {/*
{transactionmodal}
*/} + {/*
*/} -
- {children} -
-
+ vaul-drawer-wrapper='' + className='min-h-[100vh] text-gray-300' + > + {children} + + +