Skip to content

Commit

Permalink
fix: add default nidfor note dto
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Jan 14, 2024
1 parent c1ef2db commit a4143ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/app/(app)/preview/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import type {

import { simpleCamelcaseKeys } from '@mx-space/api-client'

import { previewDataAtom } from '~/atoms/preview'
import { ErrorBoundary } from '~/components/common/ErrorBoundary'
import { Paper } from '~/components/layout/container/Paper'
import { NoteMetaBar, NoteRootBanner } from '~/components/modules/note'
Expand Down Expand Up @@ -67,7 +66,7 @@ const safeParse = (value: string) => {
return null
}
}

const previewDataAtom = atom<PostModel | NoteModel | null>(null)
export default function PreviewPage() {
useIsomorphicLayoutEffect(() => {
const search = location.search
Expand Down Expand Up @@ -97,6 +96,7 @@ export default function PreviewPage() {

if (exist) {
const parsedData = safeParse(exist)

if (!parsedData) return
jotaiStore.set(previewDataAtom, simpleCamelcaseKeys(parsedData))
}
Expand Down
1 change: 1 addition & 0 deletions src/app/(dashboard)/dashboard/notes/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const createInitialEditingData = (): NoteDto => {
allowComment: true,

id: '',
nid: 0,
location: null,
coordinates: null,
images: [],
Expand Down
4 changes: 0 additions & 4 deletions src/atoms/preview.ts

This file was deleted.

1 comment on commit a4143ff

@vercel
Copy link

@vercel vercel bot commented on a4143ff Jan 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

shiro – ./

shiro-git-main-innei.vercel.app
shiro-innei.vercel.app
springtide.vercel.app
innei.in

Please sign in to comment.