Skip to content
Merged
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
21 changes: 10 additions & 11 deletions src/app/plugins/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import {
FlaskConical,
BadgeCheck,
} from "lucide-react";
import dynamic from "next/dynamic";
import { cache } from "react";
import nextDynamic from "next/dynamic";
import Image from "next/image";
import PluginImage from "@/components/PluginImage";
import VersionSelector from "@/components/VersionSelector";
Expand All @@ -27,7 +26,7 @@ import { VERIFIED_ORGS } from "@/lib/constants";
import CopyCommand from "@/components/CopyCommand";

import VersionDescription from "@/components/VersionDescription";
const PluginAnalyticsChart = dynamic(
const PluginAnalyticsChart = nextDynamic(
() => import("@/components/PluginAnalyticsChart"),
{
loading: () => (
Expand All @@ -37,15 +36,15 @@ const PluginAnalyticsChart = dynamic(
),
},
);
const DependencyGraph = dynamic(() => import("@/components/DependencyGraph"), {
const DependencyGraph = nextDynamic(() => import("@/components/DependencyGraph"), {
ssr: false,
loading: () => (
<div className="card p-6 h-[200px] grid place-items-center">
<p className="text-text-muted text-sm">Loading dependency graph...</p>
</div>
),
});
const PluginDiscussion = dynamic(
const PluginDiscussion = nextDynamic(
() => import("@/components/PluginDiscussion"),
{
ssr: false,
Expand All @@ -56,7 +55,7 @@ const PluginDiscussion = dynamic(
),
},
);
const VirusTotalCard = dynamic(() => import("@/components/VirusTotalCard"), {
const VirusTotalCard = nextDynamic(() => import("@/components/VirusTotalCard"), {
ssr: false,
loading: () => (
<div className="card p-6 h-[200px] grid place-items-center">
Expand All @@ -65,12 +64,12 @@ const VirusTotalCard = dynamic(() => import("@/components/VirusTotalCard"), {
),
});

const getPlugin = cache(async function getPlugin(slug: string) {
const { data } = await fetchApi(`/api/v1/plugins/${slug}`, {
revalidate: 30,
});
export const dynamic = "force-dynamic";

async function getPlugin(slug: string) {
const { data } = await fetchApi(`/api/v1/plugins/${slug}`);
return data?.data || null;
});
}

export async function generateMetadata({
params,
Expand Down
2 changes: 1 addition & 1 deletion src/components/NavbarClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default function NavbarClient({
const signOutButton = (
<button
onClick={() => {
signOut();
signOut({ callbackUrl: "/" });
setDropdownOpen(false);
onNavigate?.();
}}
Expand Down
Loading