Skip to content

Commit

Permalink
feat: add music into PostMeta
Browse files Browse the repository at this point in the history
  • Loading branch information
wibus-wee committed Jul 8, 2024
1 parent 555c812 commit be48e3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/pages/notes/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ const NoteView: React.FC<{ id: string }> = memo((props) => {
`手记${note.topic ? ` / ${note.topic.name}` : ''}`,
)
// Music is deprecated. Use custom meta instead.
// @ts-expect-error Meta 理论上是自定义的,但是 api-client 却将其 hardcode 了。
useNoteMusic(note.meta?.music as string)
useNoteMusic(note.meta?.music)
useJumpToSimpleMarkdownRender(note.id)

const { title, id, text } = note
Expand Down
1 change: 1 addition & 0 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ declare module '@mx-space/api-client' {
cover?: string
banner?: string | { type: string; message: string }
xLog?: XLogMeta
music?: string
}
interface TextBaseModel extends BaseCommentIndexModel {
meta?: PostMeta
Expand Down

0 comments on commit be48e3b

Please sign in to comment.