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
+2 -2
View File
@@ -36,8 +36,8 @@ const useIsSubplebbitOffline = (subplebbit: Subplebbit) => {
const offlineTitle = isLoading
? 'downloading board...'
: updatedAt
? isOffline && t('posts_last_synced_info', { time: getFormattedTimeAgo(updatedAt), interpolation: { escapeValue: false } })
: t('subplebbit_offline_info');
? isOffline && t('posts_last_synced_info', { time: getFormattedTimeAgo(updatedAt), interpolation: { escapeValue: false } })
: t('subplebbit_offline_info');
return { isOffline: !isOnline && isOffline, isOnlineStatusLoading: !isOnline && isLoading, offlineIconClass, offlineTitle };
};
+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);
+7 -4
View File
@@ -38,10 +38,13 @@ const usePublishReply = ({ cid, subplebbitAddress, postCid }: { cid: string; sub
const setPublishReplyOptions = 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 };
setPublishReplyStore(newOptions);