Skip to content

Commit

Permalink
refactor: remove prefersLatestPublished handling (#7305)
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored Aug 5, 2024
1 parent d53ab33 commit 542b07b
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,21 +150,6 @@ export const DocumentPaneProvider = memo((props: DocumentPaneProviderProps) => {

const [timelineError, setTimelineError] = useState<Error | null>(null)

/**
* The `preferLatestPublished` parameter can be used to "force" viewing the revision
* of the last published document. This is not a permanent function, and will likely
* be removed when we move to a more robust way of viewing "releases".
*/
useEffect(() => {
if (params.prefersLatestPublished && editState.published) {
setPaneParams({
//ensure we only run on first load
...omit(params, 'prefersLatestPublished'),
rev: `${editState.published._updatedAt}/${editState.published._rev}`,
})
}
}, [editState, setPaneParams, params])

/**
* Create an intermediate store which handles document Timeline + TimelineController
* creation, and also fetches pre-requsite document snapshots. Compatible with `useSyncExternalStore`
Expand Down

0 comments on commit 542b07b

Please sign in to comment.