Fetch it (#4974)
parent
9f1c411360
commit
92989282ae
|
@ -134,11 +134,9 @@ export function PostThread({uri}: {uri: string | undefined}) {
|
||||||
| undefined
|
| undefined
|
||||||
const {data: threadgateRecord} = useThreadgateRecordQuery({
|
const {data: threadgateRecord} = useThreadgateRecordQuery({
|
||||||
/**
|
/**
|
||||||
* If the user is the OP and the root post has a threadgate, we should load
|
* If the user is the OP and we have a root post, fetch the threadgate.
|
||||||
* the threadgate record. Otherwise, fallback to initialData, which is taken
|
|
||||||
* from the response from `getPostThread`.
|
|
||||||
*/
|
*/
|
||||||
enabled: Boolean(isOP && rootPostUri && initialThreadgateRecord),
|
enabled: Boolean(isOP && rootPostUri),
|
||||||
postUri: rootPostUri,
|
postUri: rootPostUri,
|
||||||
initialData: initialThreadgateRecord,
|
initialData: initialThreadgateRecord,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue