Skip to content

Commit

Permalink
remove ppr, add ClientOnly
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-tey committed Oct 10, 2024
1 parent 9a09f3b commit d461d89
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 80 deletions.
2 changes: 1 addition & 1 deletion apps/web/app/app.dub.co/(dashboard)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { constructMetadata } from "@dub/utils";
import { ReactNode } from "react";
import Providers from "../../providers";

export const experimental_ppr = true;
export const dynamic = "force-static";
export const metadata = constructMetadata();

export default async function Layout({ children }: { children: ReactNode }) {
Expand Down
6 changes: 5 additions & 1 deletion apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ module.exports = withAxiom({
reactStrictMode: false,
transpilePackages: ["shiki"],
experimental: {
ppr: "incremental",
serverComponentsExternalPackages: [
"@react-email/components",
"@react-email/render",
"@react-email/tailwind",
],
},
webpack: (config, { webpack, isServer }) => {
if (isServer) {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"jszip": "^3.10.1",
"lucide-react": "^0.367.0",
"nanoid": "^5.0.1",
"next": "14.3.0-canary.58",
"next": "14.3.0-canary.42",
"next-auth": "^4.24.4",
"next-axiom": "^1.3.0",
"next-plausible": "^3.12.0",
Expand Down
4 changes: 1 addition & 3 deletions apps/web/ui/layout/main-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ export function MainNav({
)}
/>
</div>
<div className="scrollbar-hide relative flex h-full w-full flex-col overflow-y-auto overflow-x-hidden">
<SidebarNav toolContent={toolContent} />
</div>
<SidebarNav toolContent={toolContent} />
</div>
</div>
<div className="bg-neutral-100 md:pt-1.5">
Expand Down
6 changes: 3 additions & 3 deletions apps/web/ui/layout/sidebar/sidebar-nav.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import useWorkspace from "@/lib/swr/use-workspace";
import { Wordmark } from "@dub/ui";
import { ClientOnly, Wordmark } from "@dub/ui";
import { cn } from "@dub/utils";
import { ChevronLeft } from "lucide-react";
import Link from "next/link";
Expand Down Expand Up @@ -33,7 +33,7 @@ export function SidebarNav({ toolContent }: { toolContent?: ReactNode }) {
}, [slug, pathname]);

return (
<>
<ClientOnly className="scrollbar-hide relative flex h-full w-full flex-col overflow-y-auto overflow-x-hidden">
<nav className="relative p-3 text-gray-500">
<div className="relative flex items-start justify-between gap-1 pb-3">
{AREAS.map((area) => (
Expand Down Expand Up @@ -100,7 +100,7 @@ export function SidebarNav({ toolContent }: { toolContent?: ReactNode }) {
<UserSurveyButton />
<Usage />
</div>
</>
</ClientOnly>
);
}

Expand Down
124 changes: 53 additions & 71 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d461d89

Please sign in to comment.