Skip to content

Commit

Permalink
Adds breadcrumbs to synonym pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dakota002 authored and lpsinger committed Dec 10, 2024
1 parent ebbc643 commit 9a8df1c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/routes/synonyms.$synonymId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import type { ActionFunctionArgs, LoaderFunctionArgs } from '@remix-run/node'
import { redirect } from '@remix-run/node'
import {
Expand Down Expand Up @@ -43,6 +44,12 @@ import {
import DetailsDropdownContent from '~/components/DetailsDropdownContent'
import { ToolbarButtonGroup } from '~/components/ToolbarButtonGroup'
import { getFormDataString } from '~/lib/utils'
import type { BreadcrumbHandle } from '~/root/Title'

export const handle: BreadcrumbHandle & SEOHandle = {
breadcrumb: 'Edit',
getSitemapEntries: () => null,
}

export async function loader({
request,
Expand Down
7 changes: 7 additions & 0 deletions app/routes/synonyms.new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import type { ActionFunctionArgs, LoaderFunctionArgs } from '@remix-run/node'
import {
Form,
Expand Down Expand Up @@ -32,6 +33,12 @@ import {
} from './synonyms/synonyms.server'
import DetailsDropdownContent from '~/components/DetailsDropdownContent'
import { getFormDataString } from '~/lib/utils'
import type { BreadcrumbHandle } from '~/root/Title'

export const handle: BreadcrumbHandle & SEOHandle = {
breadcrumb: 'New',
getSitemapEntries: () => null,
}

export async function action({ request }: ActionFunctionArgs) {
const user = await getUser(request)
Expand Down
7 changes: 7 additions & 0 deletions app/routes/synonyms/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
import type { SEOHandle } from '@nasa-gcn/remix-seo'
import type { LoaderFunctionArgs } from '@remix-run/node'
import { Outlet } from '@remix-run/react'
import { GridContainer } from '@trussworks/react-uswds'

import { getUser } from '../_auth/user.server'
import { moderatorGroup } from '../circulars/circulars.server'
import type { BreadcrumbHandle } from '~/root/Title'

export const handle: BreadcrumbHandle & SEOHandle = {
breadcrumb: 'Synonyms',
getSitemapEntries: () => null,
}

export async function loader({ request }: LoaderFunctionArgs) {
const user = await getUser(request)
Expand Down

0 comments on commit 9a8df1c

Please sign in to comment.