Skip to content

Commit

Permalink
fix(hub): build with rivet gives 404s
Browse files Browse the repository at this point in the history
  • Loading branch information
jog1t committed Jan 16, 2025
1 parent d5bb24a commit 3bea18b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 14 deletions.
16 changes: 8 additions & 8 deletions frontend/apps/hub/src/components/get-started.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function GetStarted() {
</div>
</CardContent>
</Card>
<Card
{/* <Card
id="examples"
asChild
className="max-w-xl w-full mx-auto my-6"
Expand Down Expand Up @@ -156,7 +156,7 @@ export function GetStarted() {
</motion.div>
</CardContent>
</motion.div>
</Card>
</Card> */}
<Card asChild className="max-w-xl w-full mx-auto my-6">
<motion.div>
<CardHeader>
Expand All @@ -175,31 +175,31 @@ export function GetStarted() {
className="grid md:grid-cols-2 gap-4"
>
<ExampleLink
href="examples"
href="docs"
title="What are Actors?"
size="md"
icon={faActors}
/>
<ExampleLink
href="examples"
href="docs/rpc"
title="RPC"
size="md"
icon={faArrowProgress}
/>
<ExampleLink
href="examples"
href="docs/state"
size="md"
title="State"
icon={faDiagramNext}
/>
<ExampleLink
href="https://rivet.gg/examples"
href="docs/scaling"
title="Scaling & Concurrency"
size="md"
icon={faUpRightAndDownLeftFromCenter}
/>
<ExampleLink
href="https://rivet.gg/examples"
href="docs/edge"
size="md"
title="Edge Networking"
icon={faCircleNodes}
Expand All @@ -215,7 +215,7 @@ export function GetStarted() {
>
<motion.a
variants={linkVariants}
href="https://rivet.gg/examples"
href="https://rivet.gg/docs?utm_source=hub"
target="_blank"
rel="noreferrer"
>
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/components/src/code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { javascript } from "@codemirror/lang-javascript";
import { json, jsonParseLinter } from "@codemirror/lang-json";
import { linter } from "@codemirror/lint";
import { EditorView } from "@codemirror/view";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@radix-ui/react-tabs";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs";
import { Icon, faCopy, faFile } from "@rivet-gg/icons";
import { githubDark } from "@uiw/codemirror-theme-github";
import ReactCodeMirror, {
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/components/src/docs-sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function DocsSheet({ path, title, children }: DocsSheetProps) {
<SheetTitle>{title}</SheetTitle>
<Text className="text-xs">
<Link
href={`https://rivet.gg/${path}?utm_source=hub`}
href={`https://rivet.gg/${path}?utm_source=hub&embed=true`}
target="_blank"
rel="noopener noreferrer"
>
Expand Down
2 changes: 1 addition & 1 deletion site/src/app/(v2)/[section]/[[...page]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default async function CatchAllCorePage({ params: { section, page } }) {
<DocsNavigation sidebar={foundTab.tab.sidebar} />
) : null}
</aside>
<main className="mx-auto mt-8 w-full max-w-prose px-8 pb-8">
<main className="md:mx-auto mt-8 w-full max-w-prose px-8 pb-8">
<Prose as="article">
{parentPage && (
<div className="eyebrow h-5 text-primary text-sm font-semibold">
Expand Down
2 changes: 2 additions & 0 deletions site/src/app/(v2)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Footer } from "@/components/Footer";

Check failure on line 1 in site/src/app/(v2)/layout.tsx

View workflow job for this annotation

GitHub Actions / quality

organizeImports

Import statements could be sorted:
import { EmbedDetector } from "@/components/EmbedDetector";
import "@/styles/v2.css";

export default function Layout({ children }) {
return (
<>
{children}
<EmbedDetector />
<Footer />
</>
);
Expand Down
2 changes: 1 addition & 1 deletion site/src/components/DocsTableOfContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export function DocsTableOfContents({
ref={ref}
className={cn(
className,
"lg:top-header pt-10 md:pt-36 lg:pt-6",
"lg:top-header pt-10 lg:pt-6",
"w-full lg:pointer-events-auto lg:sticky lg:block lg:max-w-aside lg:self-start lg:overflow-y-auto",
)}
>
Expand Down
1 change: 0 additions & 1 deletion site/src/components/EmbedDetector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export function EmbedDetector() {
useEffect(() => {
if (queryParams?.get("embed") === "true") {
document.querySelector("body > header")?.classList.add("hidden");
document.querySelector("body > div")?.classList.add("hidden");
}
}, [queryParams]);

Expand Down
2 changes: 1 addition & 1 deletion site/src/components/v2/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function Header({ active, subnav }: HeaderProps) {
const [ref, setRef] = useState<Element | null>(null);
return (
<RivetHeader
className="px-8 md:[&>div:first-child]:max-w-[calc(20rem+65ch+20rem)] md:[&>div:first-child]:px-0"
className="lg:px-8 md:[&>div:first-child]:max-w-[calc(20rem+65ch+20rem)] md:[&>div:first-child]:px-0"
logo={
<Link href="/">
<Image {...logoUrl} className="w-20" alt="Rivet logo" />
Expand Down

0 comments on commit 3bea18b

Please sign in to comment.