run prettier

This commit is contained in:
plebeius
2025-12-27 16:35:51 +01:00
parent baea8ca008
commit cee682ae52
3 changed files with 16 additions and 10 deletions
+7 -4
View File
@@ -37,10 +37,13 @@ const usePublishPost = ({ subplebbitAddress }: { subplebbitAddress?: string }) =
const setPublishPostOptions = useCallback(
(options: Partial<Comment>) => {
const baseOptions = createBaseOptions();
const sanitizedOptions = Object.entries(options).reduce((acc, [key, value]) => {
acc[key] = value === '' ? undefined : value;
return acc;
}, {} as Partial<Comment>);
const sanitizedOptions = Object.entries(options).reduce(
(acc, [key, value]) => {
acc[key] = value === '' ? undefined : value;
return acc;
},
{} as Partial<Comment>,
);
const newOptions = { ...baseOptions, ...sanitizedOptions };
setPublishPostStore(newOptions);