Skip to content

Commit

Permalink
updated "header" --> "nav"
Browse files Browse the repository at this point in the history
  • Loading branch information
melissasamworth committed Feb 14, 2024
1 parent 1267b5a commit 8ea9e61
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 88 deletions.
1 change: 0 additions & 1 deletion app/components/ArticlesDropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const ArticlesDropdown = ({toc, categories}: ArticlesDropdownProps) => {
useEffect(() => setShown(false), [shown])

const Link = ({to, text, className}: {to: string; text: string; className?: string}) => (
// add the line below to ArticlesSection
<div className={'articles-dropdown-entry ' + (className || '')}>
<LinkElem to={to} onClick={hide}>
{text}
Expand Down
48 changes: 0 additions & 48 deletions app/components/Header/index.tsx

This file was deleted.

31 changes: 0 additions & 31 deletions app/components/Header/nav.css

This file was deleted.

6 changes: 3 additions & 3 deletions app/components/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {ReactNode, Suspense} from 'react'
import {Await, useOutletContext} from '@remix-run/react'
import type {Context} from '~/root'
import Footer from '~/components/Footer'
import Header from '~/components/Nav'
import Nav from '~/components/Nav'
import {useTags} from '~/hooks/useCachedObjects'
import useToC from '~/hooks/useToC'

Expand All @@ -13,8 +13,8 @@ const Page = ({children}: {children: ReactNode}) => {

return (
<>
<Suspense fallback={<Header toc={toc} categories={[]} />}>
<Await resolve={tags}>{(tags) => <Header toc={toc} categories={tags} />}</Await>
<Suspense fallback={<Nav toc={toc} categories={[]} />}>
<Await resolve={tags}>{(tags) => <Nav toc={toc} categories={tags} />}</Await>
</Suspense>
{children}

Expand Down
4 changes: 2 additions & 2 deletions app/routes/questions.editors.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Header from '~/components/Nav'
import Nav from '~/components/Nav'
import Footer from '~/components/Footer'
import {fetchAllQuestionsOnSite} from '~/routes/questions.allQuestionsOnSite'
import type {Question} from '../server-utils/stampy'
Expand Down Expand Up @@ -53,7 +53,7 @@ export default function App() {

return (
<>
<Header categories={[]} toc={[]} />
<Nav categories={[]} toc={[]} />
<main>
<ul className="urls">
<li>
Expand Down
6 changes: 3 additions & 3 deletions stories/Header.stories.ts → stories/Nav.stories.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type {Meta, StoryObj} from '@storybook/react'
import Header from '../app/components/Nav'
import Nav from '../app/components/Nav'

const meta = {
title: 'Components/Nav',
component: Header,
component: Nav,
tags: ['autodocs'],
} satisfies Meta<typeof Header>
} satisfies Meta<typeof Nav>
export default meta
type Story = StoryObj<typeof meta>
export const Primary: Story = {
Expand Down

0 comments on commit 8ea9e61

Please sign in to comment.