Fix hooks called in inconsistent order

This commit is contained in:
ekzyis 2023-11-21 23:03:23 +01:00
parent 3bb24652b3
commit 64e176ce1d
2 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ export function PostForm ({ type, sub, children }) {
return (
<FeeButtonProvider
baseLineItems={sub ? postCommentBaseLineItems({ baseCost: sub.baseCost, allowFreebies: sub.allowFreebies, me: !!me }) : undefined}
useRemoteLineItems={postCommentUseRemoteLineItems({ me: !!me })}
useRemoteLineItems={postCommentUseRemoteLineItems()}
>
<FormType sub={sub}>{children}</FormType>
</FeeButtonProvider>

View File

@ -159,7 +159,7 @@ export default forwardRef(function Reply ({ item, onSuccess, replyOpen, children
<div className={styles.reply}>
<FeeButtonProvider
baseLineItems={postCommentBaseLineItems({ baseCost: 1, comment: true, me: !!me })}
useRemoteLineItems={postCommentUseRemoteLineItems({ parentId: item.id, me: !!me })}
useRemoteLineItems={postCommentUseRemoteLineItems({ parentId: item.id })}
>
<Form
initial={{