Skip to content

Commit

Permalink
[desk-tool] fix inappropriate live document evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
vicmeow authored and rexxars committed Oct 6, 2020
1 parent ee4646f commit 97d9d39
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,14 @@ interface DocumentSparklineProps {
badges: Badge[]
lastUpdated: string | undefined | null
editState: any
type: string | undefined
}

export function DocumentSparkline({type, badges, lastUpdated, editState}: DocumentSparklineProps) {
export function DocumentSparkline({badges, lastUpdated, editState}: DocumentSparklineProps) {
const [transitionDirection, setTransitionDirection] = React.useState<'in' | 'out' | ''>('')
const {open: openHistory, historyController, timeline} = useDocumentHistory()
const showingRevision = historyController.onOlderRevision()
const syncState = useSyncState(timeline?.publishedId)
const isLiveDocument = type === 'live'
const isLiveDocument = editState?.liveEdit

const chunks = timeline.mapChunks(chunk => chunk)
// Find the first unpublish or publish event and use it as the base event if it exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@ export function DocumentStatusBar(props: DocumentStatusBarProps) {

return (
<div className={styles.root}>
<DocumentSparkline
type={props.type}
editState={editState}
badges={badges}
lastUpdated={props.lastUpdated}
/>
<DocumentSparkline editState={editState} badges={badges} lastUpdated={props.lastUpdated} />
<div className={styles.actions}>
<div className={styles.actionsWrapper}>
{showingRevision ? (
Expand Down

0 comments on commit 97d9d39

Please sign in to comment.