Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/app/_components/ClientRootComponents.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use client'

import { Toaster } from '@/components/ui/Toaster'
import { useInstallJuicecrowdWindowObject } from '@/hooks/useInstallJuicecrowdWindowObject'

/**
* Root components that are only rendered on the client.
*/
export const ClientRootComponents = () => {
useInstallJuicecrowdWindowObject()
return <Toaster />
}
20 changes: 20 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { fonts } from '@/lib/fonts'
import '../styles/globals.scss'
import { ClientRootComponents } from './_components/ClientRootComponents'

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body
className={`${fonts.beatrice.variable} ${fonts.agrandir.variable} ${fonts.agrandirWide.variable} font-body text-base md:text-sm`}
>
{children}
<ClientRootComponents />
</body>
</html>
)
}
10 changes: 10 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { LandingPage } from '@/components/Landing'
import { Layout } from '@/components/layout'

export default function Page() {
return (
<Layout>
<LandingPage />
</Layout>
)
}
2 changes: 2 additions & 0 deletions src/components/ConnectKitButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client'

import { ConnectKitButton as _ConnectKitButton } from 'connectkit'
import { Button, buttonVariants } from './ui/Button'
import { VariantProps } from 'class-variance-authority'
Expand Down
5 changes: 2 additions & 3 deletions src/components/Landing/components/JuicecrowdCTA.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
'use client'

import { Link } from '@/components/Link'
import { EthereumIconFilled } from '@/components/icon/EthereumIconFilled'
import { Button } from '@/components/ui/Button'
import {
JC01SubmissionsClosed,
JC01_DATES,
JC01_DATE_STRINGS,
} from '@/lib/constants/crowds'
import { dateToCountdownString } from '@/lib/date/format'
import Image from 'next/image'
import { useEffect, useState } from 'react'
import { twMerge } from 'tailwind-merge'

export type JuicecrowdCTAProps = {
Expand Down
2 changes: 2 additions & 0 deletions src/components/Landing/components/StayInLoopSection.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client'

import { useState } from 'react'
import { Input } from '@/components/Input'
import { twMerge } from 'tailwind-merge'
Expand Down
2 changes: 2 additions & 0 deletions src/components/layout/AppProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client'

import {
JBProjectMetadataProvider,
_JBProjectMetadata,
Expand Down
2 changes: 2 additions & 0 deletions src/components/layout/Navbar/components/MinimalNavbar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client'

import { ConnectKitButton } from '@/components/ConnectKitButton'
import { Button } from '@/components/ui/Button'
import { useJbProject } from '@/hooks/useJbProject'
Expand Down
2 changes: 2 additions & 0 deletions src/components/layout/Navbar/components/MobileNavbar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client'

import { Link } from '@/components/Link'
import Logo from '@/components/Logo'
import { CoinLogo } from '@/components/icon/CoinLogo'
Expand Down
10 changes: 10 additions & 0 deletions src/hooks/useInstallJuicecrowdWindowObject.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use client'

import { installJuicecrowdWindowObject } from '@/lib/featureFlags'
import { useEffect } from 'react'

export const useInstallJuicecrowdWindowObject = () => {
useEffect(() => {
installJuicecrowdWindowObject()
}, [])
}
15 changes: 0 additions & 15 deletions src/pages/index.tsx

This file was deleted.