Skip to content

Commit

Permalink
providers 作成
Browse files Browse the repository at this point in the history
  • Loading branch information
kuramapommel committed Aug 21, 2024
1 parent 85d104b commit 12fc42c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions sample/src/providers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react'
import { Admin } from 'react-admin'
import { useDataProvider } from './hooks/use-data-provider'

type Props = {
children: React.ReactNode
}

const Providers = React.memo(function Providers({ children }: Props) {
const dataProvider = useDataProvider()
return (
<Admin basename="/tenant" dataProvider={dataProvider}>
{children}
</Admin>
)
})

export default Providers

0 comments on commit 12fc42c

Please sign in to comment.