Skip to content

Commit

Permalink
feat: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
andresgutgon committed Jul 27, 2024
1 parent 23c33ec commit c4cc0b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion apps/web/src/app/(private)/_data-access/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
ProjectsRepository,
} from '@latitude-data/core'
import { getCurrentUser } from '$/services/auth/getCurrentUser'
import { notFound } from 'next/navigation'

export const getFirstProject = cache(
async ({ workspaceId }: { workspaceId: number }) => {
Expand Down Expand Up @@ -60,7 +61,7 @@ export const getDocumentByUuid = cache(
if (result.error) {
const error = result.error
if (error instanceof NotFoundError) {
return null
return notFound()
}

throw error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
getDocumentByUuid,
} from '$/app/(private)/_data-access'
import { getCurrentUser } from '$/services/auth/getCurrentUser'
import { notFound } from 'next/navigation'

import DocumentsLayout from '../../_components/DocumentsLayout'
import ClientDocumentEditor from './_components/DocumentEditor'
Expand All @@ -27,8 +26,6 @@ export default async function DocumentPage({
commit,
})

if (!document) return notFound()

return (
<DocumentsLayout
projectId={projectId}
Expand Down

0 comments on commit c4cc0b5

Please sign in to comment.