Skip to content

Commit

Permalink
refactor(tasks): move TasksUpsellContext to singletons
Browse files Browse the repository at this point in the history
  • Loading branch information
binoy14 committed Apr 29, 2024
1 parent c3b756b commit b422fab
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/sanity/src/_singletons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ export * from './tasks/enabled/TasksEnabledContext'
export * from './tasks/mentionUser/MentionUserContext'
export * from './tasks/navigation/TasksNavigationContext'
export * from './tasks/tasks/TasksContext'
export * from './tasks/tasks/TasksUpsellContext'
export * from './user-color/UserColorManagerContext'
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {createContext} from 'react'

import {type TasksUpsellContextValue} from './types'
import {TasksUpsellContextValue} from '../../../core/tasks/context/upsell/types'

/**
* @beta
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {useTelemetry} from '@sanity/telemetry/react'
import {template} from 'lodash'
import {useCallback, useEffect, useMemo, useState} from 'react'
import {TasksUpsellContext} from 'sanity/_singletons'

import {useClient, useProjectId} from '../../../hooks'
import {
Expand All @@ -12,7 +13,6 @@ import {
} from '../../../studio'
import {type UpsellData} from '../../../studio/upsell/types'
import {UpsellDialog} from '../../../studio/upsell/UpsellDialog'
import {TasksUpsellContext} from './TasksUpsellContext'
import {type TasksUpsellContextValue} from './types'

const FEATURE = 'tasks'
Expand Down
1 change: 0 additions & 1 deletion packages/sanity/src/core/tasks/context/upsell/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './TasksUpsellContext'
export * from './TasksUpsellProvider'
export * from './types'
export * from './useTasksUpsell'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {useContext} from 'react'
import {TasksUpsellContext} from 'sanity/_singletons'

import {TasksUpsellContext} from './TasksUpsellContext'
import {type TasksUpsellContextValue} from './types'

/**
Expand Down

0 comments on commit b422fab

Please sign in to comment.