Files
Arkie-Library-Frontend/src/main.tsx
TerryM 88a25b6ad4
Some checks failed
Deploy to Frontend Servers / deploy (push) Failing after 14s
feat: scroll to post bubble from recommended card + back-to-top button
Recommended cards already routed to /browse#post-<id>, but the stream had
no logic to scroll to the target bubble — and the post might not be paged
in yet. MessageStream now resolves the #post-<id> hash, auto-loads more
pages until the bubble renders, scrolls to it, and gives it a brief gold
highlight. Bubbles get scroll-mt so they clear the sticky header.

Also adds a global floating back-to-top button (BackToTop) mounted in
PublicLayout, shown after scrolling past 400px.

Bundles related staging UI work already present in the working tree.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 11:50:27 +08:00

27 lines
611 B
TypeScript

import React from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
const adminOnly = import.meta.env.VITE_ADMIN_ONLY === "true";
void (async () => {
const root = document.getElementById("root")!;
if (adminOnly) {
const { default: AppAdminOnly } = await import("./AppAdminOnly");
ReactDOM.createRoot(root).render(
<React.StrictMode>
<AppAdminOnly />
</React.StrictMode>,
);
return;
}
const { default: App } = await import("./App");
ReactDOM.createRoot(root).render(
<React.StrictMode>
<App />
</React.StrictMode>,
);
})();