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 (
|
return (
|
||||||
<FeeButtonProvider
|
<FeeButtonProvider
|
||||||
baseLineItems={sub ? postCommentBaseLineItems({ baseCost: sub.baseCost, allowFreebies: sub.allowFreebies, me: !!me }) : undefined}
|
baseLineItems={sub ? postCommentBaseLineItems({ baseCost: sub.baseCost, allowFreebies: sub.allowFreebies, me: !!me }) : undefined}
|
||||||
useRemoteLineItems={postCommentUseRemoteLineItems({ me: !!me })}
|
useRemoteLineItems={postCommentUseRemoteLineItems()}
|
||||||
>
|
>
|
||||||
<FormType sub={sub}>{children}</FormType>
|
<FormType sub={sub}>{children}</FormType>
|
||||||
</FeeButtonProvider>
|
</FeeButtonProvider>
|
||||||
|
|
|
@ -159,7 +159,7 @@ export default forwardRef(function Reply ({ item, onSuccess, replyOpen, children
|
||||||
<div className={styles.reply}>
|
<div className={styles.reply}>
|
||||||
<FeeButtonProvider
|
<FeeButtonProvider
|
||||||
baseLineItems={postCommentBaseLineItems({ baseCost: 1, comment: true, me: !!me })}
|
baseLineItems={postCommentBaseLineItems({ baseCost: 1, comment: true, me: !!me })}
|
||||||
useRemoteLineItems={postCommentUseRemoteLineItems({ parentId: item.id, me: !!me })}
|
useRemoteLineItems={postCommentUseRemoteLineItems({ parentId: item.id })}
|
||||||
>
|
>
|
||||||
<Form
|
<Form
|
||||||
initial={{
|
initial={{
|
||||||
|
|
Loading…
Reference in New Issue