chore: consolidates admin view types
This commit is contained in:
@@ -25,6 +25,7 @@ const CustomDefaultView: AdminViewComponent = ({ canAccessAdmin, user }) => {
|
||||
const {
|
||||
routes: { admin: adminRoute },
|
||||
} = useConfig()
|
||||
|
||||
const { setStepNav } = useStepNav()
|
||||
|
||||
// This effect will only run one time and will allow us
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import React, { Fragment, useEffect } from 'react'
|
||||
import { Redirect } from 'react-router-dom'
|
||||
|
||||
import type { EditViewComponent } from '../../../../../packages/payload/src/config/types'
|
||||
import type { AdminViewComponent } from '../../../../../packages/payload/src/config/types'
|
||||
|
||||
import { useStepNav } from '../../../../../packages/payload/src/admin/components/elements/StepNav'
|
||||
import { useConfig } from '../../../../../packages/payload/src/admin/components/utilities/Config'
|
||||
|
||||
const CustomDefaultView: EditViewComponent = ({
|
||||
const CustomDefaultView: AdminViewComponent = ({
|
||||
canAccessAdmin,
|
||||
// collection,
|
||||
// global,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import React, { Fragment, useEffect } from 'react'
|
||||
import { Redirect } from 'react-router-dom'
|
||||
|
||||
import type { EditViewComponent } from '../../../../../packages/payload/src/config/types'
|
||||
import type { AdminViewComponent } from '../../../../../packages/payload/src/config/types'
|
||||
|
||||
import { useStepNav } from '../../../../../packages/payload/src/admin/components/elements/StepNav'
|
||||
import { useConfig } from '../../../../../packages/payload/src/admin/components/utilities/Config'
|
||||
|
||||
const CustomEditView: EditViewComponent = ({
|
||||
const CustomEditView: AdminViewComponent = ({
|
||||
canAccessAdmin,
|
||||
// collection,
|
||||
// global,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import React, { Fragment, useEffect } from 'react'
|
||||
import { Redirect } from 'react-router-dom'
|
||||
|
||||
import type { EditViewComponent } from '../../../../../packages/payload/src/config/types'
|
||||
import type { AdminViewComponent } from '../../../../../packages/payload/src/config/types'
|
||||
|
||||
import { useStepNav } from '../../../../../packages/payload/src/admin/components/elements/StepNav'
|
||||
import { useConfig } from '../../../../../packages/payload/src/admin/components/utilities/Config'
|
||||
|
||||
const CustomVersionsView: EditViewComponent = ({
|
||||
const CustomVersionsView: AdminViewComponent = ({
|
||||
canAccessAdmin,
|
||||
// collection,
|
||||
// global,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React, { Fragment, useEffect } from 'react'
|
||||
|
||||
import { useStepNav } from '../../../../../packages/payload/src/admin/components/elements/StepNav'
|
||||
import { type EditViewComponent } from '../../../../../packages/payload/src/config/types'
|
||||
import { type AdminViewComponent } from '../../../../../packages/payload/src/config/types'
|
||||
|
||||
const CustomView: EditViewComponent = () => {
|
||||
const CustomView: AdminViewComponent = () => {
|
||||
const { setStepNav } = useStepNav()
|
||||
|
||||
// This effect will only run one time and will allow us
|
||||
|
||||
Reference in New Issue
Block a user