Skip to content

Commit

Permalink
no more home
Browse files Browse the repository at this point in the history
  • Loading branch information
abernier committed Aug 9, 2024
1 parent 8d72067 commit c328aba
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 115 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ dist/
logs/
out/
tmp/
temp/
temp/
docs/
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Search from '@/components/Search'
import Link from 'next/link'
// import { useRouter } from 'next/router'
import { useLockBodyScroll } from '@/hooks/useLockBodyScroll'
import libs from '@/data/libraries'

import ToggleTheme from '@/components/ToggleTheme'

Expand Down Expand Up @@ -90,7 +89,7 @@ export default async function Layout({ params, children }: Props) {
className="overflow-y-auto px-4 font-medium text-base lg:text-sm pb-10 lg:pb-14 sticky?lg:h-(screen-16) z-10 relative"
>
<div className="mt-8 md:mt-0 mb-4">
<LibSwitcher currentPage={libs[lib].title} lib={lib} />
<LibSwitcher currentPage={libraries[lib].title} lib={lib} />
</div>
<Nav docs={docs} asPath={asPath} />
</nav>
Expand Down
File renamed without changes.
106 changes: 0 additions & 106 deletions src/app/page.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/Nav.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react'
import clsx from 'clsx'
import Link from 'next/link'
import { Doc } from '../app/[...slug]/DocsContext'
import { Doc } from '@/app/[[...slug]]/DocsContext'

interface NavItemProps {
doc: Doc
Expand Down
2 changes: 1 addition & 1 deletion src/components/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { fetchCSB } from '@/components/Codesandbox'
import remarkGFM from 'remark-gfm'
import rehypePrismPlus from 'rehype-prism-plus'
import { codesandbox, toc } from '@/utils/rehype'
import { Doc } from '@/app/[...slug]/DocsContext'
import { Doc } from '@/app/[[...slug]]/DocsContext'

const components = {
Hint: ({ children }: { children: React.ReactNode }) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Search/SearchModalContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'
import { useRouter } from 'next/navigation'
import { matchSorter } from 'match-sorter'

import { useDocs } from '../../app/[...slug]/DocsContext'
import { useDocs } from '@/app/[[...slug]]/DocsContext'

import SearchModal from './SearchModal'
import type { SearchResult } from './SearchItem'
Expand Down
2 changes: 1 addition & 1 deletion src/components/Toc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import * as React from 'react'
import clsx from 'clsx'
import type { DocToC } from '../app/[...slug]/DocsContext'
import type { DocToC } from '@/app/[[...slug]]/DocsContext'

export interface ToCProps {
toc: DocToC[]
Expand Down
2 changes: 1 addition & 1 deletion src/utils/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import http from 'isomorphic-git/http/node'
import matter from 'gray-matter'

import libs, { Lib } from '@/data/libraries'
import type { Doc, DocToC } from '../app/[...slug]/DocsContext'
import type { Doc, DocToC } from '@/app/[[...slug]]/DocsContext'
import pMemoize from 'p-memoize'
import { cache } from 'react'
import { type CSB } from '@/components/Codesandbox'
Expand Down
2 changes: 1 addition & 1 deletion src/utils/rehype.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DocToC } from '../app/[...slug]/DocsContext'
import type { DocToC } from '@/app/[[...slug]]/DocsContext'

export interface Node {
type: string
Expand Down

0 comments on commit c328aba

Please sign in to comment.