Skip to content

Commit

Permalink
πŸ“¦ Upgrade to v0.11.0 (#20)
Browse files Browse the repository at this point in the history
* πŸ“¦ Upgrade to v0.11.0

* πŸŽ›οΈ v2 opt ins
  • Loading branch information
stevejpurves authored Sep 6, 2024
1 parent 84c9a25 commit 2cf784b
Show file tree
Hide file tree
Showing 4 changed files with 732 additions and 248 deletions.
19 changes: 13 additions & 6 deletions theme/app/routes/sandbox.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { FrontmatterBlock } from '@myst-theme/frontmatter';
import { getMetaTagsForArticle, ProjectPageCatchBoundary } from '@myst-theme/site';
import { ErrorDocumentNotFound, ErrorUnhandled, getMetaTagsForArticle } from '@myst-theme/site';
import { ArticleAndNavigation, NavigationAndFooter } from '../components/Page';
import { TabStateProvider, UiStateProvider } from '@myst-theme/providers';
import { MySTRenderer } from 'myst-demo';
import type { LoaderFunction, MetaFunction } from '@remix-run/node';
import type { LoaderFunction, V2_MetaFunction } from '@remix-run/node';
import { json } from '@remix-run/node';
import { useLoaderData } from '@remix-run/react';
import { isRouteErrorResponse, useLoaderData, useRouteError } from '@remix-run/react';
import { useEffect, useState } from 'react';

export const meta: MetaFunction = (args) => {
export const meta: V2_MetaFunction<typeof loader> = (args) => {
return getMetaTagsForArticle({
origin: '',
url: args.location.pathname,
Expand Down Expand Up @@ -188,11 +188,18 @@ export default function ContentPage() {
);
}

export function CatchBoundary() {
export function ErrorBoundary() {
const error = useRouteError();
return (
<ArticleAndNavigation>
<main className="article-content">
<ProjectPageCatchBoundary />
<main className="article">
{isRouteErrorResponse(error) ? (
<ErrorDocumentNotFound />
) : (
<ErrorUnhandled error={error as any} />
)}
</main>
</main>
</ArticleAndNavigation>
);
Expand Down
Loading

0 comments on commit 2cf784b

Please sign in to comment.