Skip to content

Commit

Permalink
refactor(tasks): move isLastPane context to singletons
Browse files Browse the repository at this point in the history
  • Loading branch information
binoy14 committed Apr 29, 2024
1 parent 7eeda3b commit 968ae85
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ import {createContext} from 'react'
* plugin authors access to what the `usePane`, `usePaneRouter`, and
* `useDocumentPane` provides without exposing specifics from the structure tool
*/
/**
* @internal
*/
export const IsLastPaneContext = createContext<boolean>(false)
1 change: 1 addition & 0 deletions packages/sanity/src/_singletons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export * from './core/studio/SourceContext'
export * from './core/studio/WorkspaceContext'
export * from './core/studio/workspaces/WorkspacesContext'
export * from './core/tasks/enabled/TasksEnabledContext'
export * from './core/tasks/isLastPane/IsLastPaneContext'
export * from './core/tasks/mentionUser/MentionUserContext'
export * from './core/tasks/navigation/TasksNavigationContext'
export * from './core/tasks/tasks/TasksContext'
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {IsLastPaneContext} from './IsLastPaneContext'
import {IsLastPaneContext} from 'sanity/_singletons'

interface IsLastPaneProviderProps {
isLastPane: boolean
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {useContext} from 'react'

import {IsLastPaneContext} from './IsLastPaneContext'
import {IsLastPaneContext} from 'sanity/_singletons'

/**
* @internal
Expand Down

0 comments on commit 968ae85

Please sign in to comment.