fix: setting default values for draft
parent
e11ed6250d
commit
26f2dec6b6
|
@ -23,13 +23,14 @@ export const currentUserDrafts = computed(() => {
|
||||||
return allDrafts.value[id]
|
return allDrafts.value[id]
|
||||||
})
|
})
|
||||||
|
|
||||||
export function getDefaultDraft({
|
export function getDefaultDraft(options: Partial<Draft['params'] & Omit<Draft, 'params'>> = {}): Draft {
|
||||||
status = '',
|
const {
|
||||||
inReplyToId,
|
status = '',
|
||||||
visibility = 'public',
|
inReplyToId,
|
||||||
placeholder = 'What is on your mind?',
|
visibility = 'public',
|
||||||
attachments = [],
|
placeholder = 'What is on your mind?',
|
||||||
}: Partial<Draft['params'] & Omit<Draft, 'params'>> = {}): Draft {
|
attachments = [],
|
||||||
|
} = options
|
||||||
return {
|
return {
|
||||||
params: {
|
params: {
|
||||||
status,
|
status,
|
||||||
|
|
Loading…
Reference in New Issue