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
1 change: 1 addition & 0 deletions next.config.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -42,6 +42,7 @@ const nextConfig: NextConfig = {
devIndicators: false,
experimental: {
cpus: 1,
optimizePackageImports: ["lucide-react"],
},
poweredByHeader: false,
turbopack: {
Expand Down
7 changes: 7 additions & 0 deletions src/app/documents/[id]/loading.tsx
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
export default function Loading() {
return (
<div className="flex h-screen items-center justify-center bg-[color:var(--background)]">
<div className="h-8 w-8 animate-spin rounded-full border-4 border-[color:var(--accent)] border-t-transparent" />
</div>
);
}
7 changes: 6 additions & 1 deletion src/app/documents/[id]/page.tsx
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
import { DocumentViewer } from "@/components/DocumentViewer";
import dynamic from "next/dynamic";

const DocumentViewer = dynamic(
() => import("@/components/DocumentViewer").then((m) => m.DocumentViewer),
{ ssr: false },
);

export default async function DocumentPage({
params,
Expand Down
7 changes: 7 additions & 0 deletions src/app/loading.tsx
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
export default function Loading() {
return (
<div className="flex h-screen items-center justify-center bg-[color:var(--background)]">
<div className="h-8 w-8 animate-spin rounded-full border-4 border-[color:var(--accent)] border-t-transparent" />
</div>
);
}
7 changes: 6 additions & 1 deletion src/app/page.tsx
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
import { ClinicalDashboard } from "@/components/clinical-dashboard";
import dynamic from "next/dynamic";
import { isAppModeId, isAppModeVisible, type AppModeId } from "@/lib/app-modes";

const ClinicalDashboard = dynamic(
() => import("@/components/clinical-dashboard").then((m) => m.ClinicalDashboard),
{ ssr: false },
);

type HomeProps = {
searchParams?: Promise<{
mode?: string | string[];
Expand Down
5 changes: 3 additions & 2 deletions src/components/ClinicalDashboard.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,6 +53,7 @@ import {
import {
type CSSProperties,
FormEvent,
memo,
useCallback,
useEffect,
useMemo,
Expand DownExpand Up@@ -509,7 +510,7 @@ function subscribeAuthEmail(onStoreChange: () => void) {
};
}

function SourceImage({
const SourceImage = memo(function SourceImage({
endpoint,
caption,
className = "max-h-52",
Expand DownExpand Up@@ -609,7 +610,7 @@ function SourceImage({
className={cn(className, "w-full rounded-lg object-contain")}
/>
);
}
});

function ScopeAndGovernanceNotice({
scope,
Expand Down
Loading