···77 type EmbedPlayerParams,
88} from "../utils/embed-player";
99import { BlueskyRichText } from "./BlueskyRichText";
1010-import type { BlueskyPost } from "../utils/embed-resolver";
1010+import type { BlueskyPost } from "../utils/bluesky";
1111import * as feedDefs from "@/lib/lexicons/app/bsky/feed/defs";
1212import * as feedPost from "@/lib/lexicons/app/bsky/feed/post";
1313import * as embedImages from "@/lib/lexicons/app/bsky/embed/images";
+7-5
app/at/(trail)/[handle]/trail/[rkey]/page.tsx
···11import { Metadata } from "next";
22import { loadTrailDetail, loadCurrentUser } from "@/data/queries";
33import { TrailView } from "./TrailView";
44-55-// Work around "Could not find the module "..." in the React Client Manifest."
66-// They're used by embeds but seems like these are being incorrectly treeshaken somewhere.
77-export { BlueskyPostEmbed } from "./embeds/BlueskyPostEmbed";
88-export { LinkPreview } from "./LinkPreview";
44+import { loadEmbed } from "@/app/loadEmbed";
95106type Props = {
117 params: Promise<{
···4339 loadCurrentUser(),
4440 ]);
45414242+ // Preload embeds for all stops that have external links
4343+ const initialEmbeds: Array<[string, Promise<React.ReactElement | null>]> = trail.stops
4444+ .filter((stop) => stop.external?.uri)
4545+ .map((stop) => [stop.external!.uri, loadEmbed(stop.external!.uri)]);
4646+4647 return (
4748 <TrailView
4849 trail={trail}
4950 cleanHandle={handle}
5051 rkey={rkey}
5152 currentUserDid={currentUser?.did || null}
5353+ initialEmbeds={initialEmbeds}
5254 />
5355 );
5456}