Skip to content

Commit

Permalink
Fetch it (#4974)
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey authored Aug 22, 2024
1 parent 9f1c411 commit 9298928
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/view/com/post-thread/PostThread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,9 @@ export function PostThread({uri}: {uri: string | undefined}) {
| undefined
const {data: threadgateRecord} = useThreadgateRecordQuery({
/**
* If the user is the OP and the root post has a threadgate, we should load
* the threadgate record. Otherwise, fallback to initialData, which is taken
* from the response from `getPostThread`.
* If the user is the OP and we have a root post, fetch the threadgate.
*/
enabled: Boolean(isOP && rootPostUri && initialThreadgateRecord),
enabled: Boolean(isOP && rootPostUri),
postUri: rootPostUri,
initialData: initialThreadgateRecord,
})
Expand Down

0 comments on commit 9298928

Please sign in to comment.