diff --git a/packages/example-nextjs14/src/app/Status.tsx b/packages/example-nextjs14/src/app/Status.tsx index 98ab2e5..d7cfc71 100644 --- a/packages/example-nextjs14/src/app/Status.tsx +++ b/packages/example-nextjs14/src/app/Status.tsx @@ -1,4 +1,6 @@ 'use client'; + +import clsx from 'clsx'; import React from 'react'; import { form } from 'shared/form'; import { useUrlState } from 'state-in-url/next'; @@ -20,7 +22,7 @@ export const Status = React.memo(({ }); return ( -
+
Other client component
@@ -28,9 +30,7 @@ export const Status = React.memo(({
           
{'{'}
diff --git a/packages/example-nextjs14/src/app/components/GithubLink.tsx b/packages/example-nextjs14/src/app/components/GithubLink.tsx index a08a213..fb9823b 100644 --- a/packages/example-nextjs14/src/app/components/GithubLink.tsx +++ b/packages/example-nextjs14/src/app/components/GithubLink.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import clsx from 'clsx' export const GithubLink = ( props: React.DetailedHTMLProps< @@ -13,11 +14,7 @@ export const GithubLink = ( href="https://github.com/asmyshlyaev177/state-in-url" target="_blank" rel="noopener" - className={`inline-flex items-center px-4 py-2 border - border-transparent text-sm font-medium rounded-md - text-white bg-gray-800 hover:bg-gray-700 - focus:outline-none focus:ring-2 focus:ring-offset-2 - focus:ring-gray-500 ${className}`} + className={clsx("inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-gray-800 hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500", className)} {...rest} > ( +export const Logo = ({ className }: { className: string }) => ( {entries.map((en, ind, arr) => (
  • - - {en.text} + + {en.text}
  • diff --git a/packages/example-nextjs14/src/app/layout.tsx b/packages/example-nextjs14/src/app/layout.tsx index f2ea64c..2e9ee5e 100644 --- a/packages/example-nextjs14/src/app/layout.tsx +++ b/packages/example-nextjs14/src/app/layout.tsx @@ -1,6 +1,7 @@ import { Analytics } from '@vercel/analytics/react'; import { Roboto } from 'next/font/google'; import { GoogleAnalytics } from '@next/third-parties/google' +import Script from 'next/script' import { metadata as _metadata } from './seoStuff'; import { isVercel, vercelUrl } from './domain'; @@ -25,9 +26,11 @@ export default async function RootLayout({ {isVercel && } + {children} + {isProd ? : null } {isProd && isVercel ? : null} diff --git a/packages/shared/components/Field.tsx b/packages/shared/components/Field.tsx index 1ecd284..3d7e0ee 100644 --- a/packages/shared/components/Field.tsx +++ b/packages/shared/components/Field.tsx @@ -15,7 +15,7 @@ export const Field = ({ return (
    diff --git a/packages/shared/components/Input.tsx b/packages/shared/components/Input.tsx index 3a5d709..0628327 100644 --- a/packages/shared/components/Input.tsx +++ b/packages/shared/components/Input.tsx @@ -1,8 +1,13 @@ +import clsx from "clsx"; + export const Input = ({ value, className, ...props }: InputProps) => { return ( diff --git a/packages/shared/components/Refresh.tsx b/packages/shared/components/Refresh.tsx index ebdc589..2927b8e 100644 --- a/packages/shared/components/Refresh.tsx +++ b/packages/shared/components/Refresh.tsx @@ -10,7 +10,7 @@ export const RefreshButton = React.memo( window.location.reload(); }} className={clsx( - `transition font-extrabold bg-orange-700 text-lg text-white`, + "transition font-extrabold bg-orange-700 text-lg text-white", className, )} name="Reload page"