Fix hooks called in inconsistent order
This commit is contained in:
parent
3bb24652b3
commit
64e176ce1d
|
@ -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>
|
||||
|
|
|
@ -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={{
|
||||
|
|
Loading…
Reference in New Issue