Skip to content

Commit

Permalink
Rename schema-data.ts to schema-data.server.ts
Browse files Browse the repository at this point in the history
Ensures that it is excluded from the client-side bundle.
  • Loading branch information
lpsinger committed Aug 17, 2023
1 parent 106c403 commit 6098226
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion app/routes/docs.schema.stable.$.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { DataFunctionArgs } from '@remix-run/node'
import { redirect } from '@remix-run/node'

import { getLatestRelease } from '~/lib/schema-data'
import { getLatestRelease } from '~/lib/schema-data.server'

export async function loader({ params: { '*': path } }: DataFunctionArgs) {
return redirect(`/docs/schema/${await getLatestRelease()}/${path}`)
Expand Down
7 changes: 5 additions & 2 deletions app/routes/docs_.schema.$version.$/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ import { Highlight } from '~/components/Highlight'
import { SideNavSub } from '~/components/SideNav'
import { Tab, Tabs } from '~/components/tabs/Tabs'
import { publicStaticShortTermCacheControlHeaders } from '~/lib/headers.server'
import type { ExampleFiles, GitContentDataResponse } from '~/lib/schema-data'
import type {
ExampleFiles,
GitContentDataResponse,
} from '~/lib/schema-data.server'
import {
getGithubDir,
getVersionRefs,
loadJson,
loadSchemaExamples,
} from '~/lib/schema-data'
} from '~/lib/schema-data.server'

export async function loader({
params: { version, '*': path },
Expand Down
2 changes: 1 addition & 1 deletion app/routes/docs_.schema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { useState } from 'react'
import DetailsDropdownButton from '~/components/DetailsDropdownButton'
import DetailsDropdownContent from '~/components/DetailsDropdownContent'
import { publicStaticShortTermCacheControlHeaders } from '~/lib/headers.server'
import { getVersionRefs } from '~/lib/schema-data'
import { getVersionRefs } from '~/lib/schema-data.server'

export async function loader({
params: { version, '*': path },
Expand Down
2 changes: 1 addition & 1 deletion app/routes/schema.stable.$.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
import { type DataFunctionArgs, redirect } from '@remix-run/node'

import { getLatestRelease } from '~/lib/schema-data'
import { getLatestRelease } from '~/lib/schema-data.server'

export async function loader({ params: { '*': path } }: DataFunctionArgs) {
return redirect(
Expand Down

0 comments on commit 6098226

Please sign in to comment.