Skip to content

Commit

Permalink
fix(corel): update imports paths
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobonamin committed Jun 28, 2024
1 parent c85934b commit 36a4013
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
import {Card, Flex, Stack, Text} from '@sanity/ui'
import {type ComponentType, type FormEvent, useCallback, useState} from 'react'
import {AddonDatasetProvider, LoadingBlock} from 'sanity'

import {Button} from '../../../../ui-components'
import {LoadingBlock} from '../../../components/loadingBlock/LoadingBlock'
import {AddonDatasetProvider} from '../../../studio/addonDataset/AddonDatasetProvider'
import {type BundleDocument} from '../types'
import {useBundleOperations} from '../useBundleOperations'
import {useBundlesStore} from '../useBundlesStore'
import {ReleaseForm} from './ReleaseForm'

const WithAddonDatasetProvider = <P extends object>(Component: ComponentType<P>): React.FC<P> => {
// Function that returns the wrapped component
const WrappedComponent: React.FC<P> = (props) => (
<AddonDatasetProvider>
<Component {...props} />
</AddonDatasetProvider>
)

// Setting a display name for the wrapped component
WrappedComponent.displayName = `WithAddonDatasetProvider(${Component.displayName || Component.name || 'Component'})`

return WrappedComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {uuid} from '@sanity/uuid'
import {useCallback} from 'react'
import {useAddonDataset} from 'sanity'

import {useAddonDataset} from '../../studio/addonDataset/useAddonDataset'
import {type BundleDocument} from './types'

// WIP - Raw implementation for initial testing purposes
Expand Down

0 comments on commit 36a4013

Please sign in to comment.