fix: updates incorrect e2e import paths
This commit is contained in:
@@ -2,7 +2,7 @@ import React from 'react'
|
||||
import { NavLink } from 'react-router-dom'
|
||||
|
||||
// As this is the demo project, we import our dependencies from the `src` directory.
|
||||
import { useConfig } from '../../../../packages/payload/src/admin/components/utilities/Config'
|
||||
import { useConfig } from '../../../../packages/ui/src/providers/Config'
|
||||
|
||||
// In your projects, you can import as follows:
|
||||
// import { useConfig } from 'payload/components/utilities';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
import { useTranslation } from '../../../../packages/ui/src/providers/Translation'
|
||||
|
||||
const BeforeLogin: React.FC<{ i18n }> = () => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
|
||||
import LogOut from '../../../../packages/payload/src/admin/components/icons/LogOut'
|
||||
import { useConfig } from '../../../../packages/payload/src/admin/components/utilities/Config'
|
||||
import { LogOut } from '../../../../packages/ui/src/icons/LogOut'
|
||||
import { useConfig } from '../../../../packages/ui/src/providers/Config'
|
||||
|
||||
const Logout: React.FC = () => {
|
||||
const config = useConfig()
|
||||
|
||||
@@ -3,12 +3,13 @@ import { Redirect } from 'react-router-dom'
|
||||
|
||||
import type { AdminViewComponent } from '../../../../../packages/payload/src/config/types'
|
||||
|
||||
import Button from '../../../../../packages/payload/src/admin/components/elements/Button'
|
||||
import { useStepNav } from '../../../../../packages/payload/src/admin/components/elements/StepNav'
|
||||
import { Button } from '../../../../../packages/ui/src/elements/Button'
|
||||
// TODO(3.0): Meta?
|
||||
// import Meta from '../../../../../packages/payload/src/admin/components/utilities/Meta'
|
||||
import { useStepNav } from '../../../../../packages/ui/src/elements/StepNav'
|
||||
import { useConfig } from '../../../../../packages/ui/src/providers/Config'
|
||||
// As this is the demo project, we import our dependencies from the `src` directory.
|
||||
import DefaultTemplate from '../../../../../packages/payload/src/admin/components/templates/Default'
|
||||
import { useConfig } from '../../../../../packages/payload/src/admin/components/utilities/Config'
|
||||
import Meta from '../../../../../packages/payload/src/admin/components/utilities/Meta'
|
||||
import { DefaultTemplate } from '../../../../../packages/ui/src/templates/Default'
|
||||
|
||||
// In your projects, you can import as follows:
|
||||
// import { DefaultTemplate } from 'payload/components/templates';
|
||||
@@ -47,11 +48,11 @@ const CustomDefaultView: AdminViewComponent = ({ canAccessAdmin, user }) => {
|
||||
|
||||
return (
|
||||
<DefaultTemplate>
|
||||
<Meta
|
||||
{/* <Meta
|
||||
description="Building custom views into Payload is easy."
|
||||
keywords="Custom React Components, Payload, CMS"
|
||||
title="Custom Admin View with Default Template"
|
||||
/>
|
||||
/> */}
|
||||
<div
|
||||
className={`${baseClass}__content`}
|
||||
style={{
|
||||
|
||||
@@ -3,8 +3,8 @@ import { Redirect } from 'react-router-dom'
|
||||
|
||||
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'
|
||||
import { useStepNav } from '../../../../../packages/ui/src/elements/StepNav'
|
||||
import { useConfig } from '../../../../../packages/ui/src/providers/Config'
|
||||
|
||||
const CustomEditView: AdminViewComponent = ({
|
||||
canAccessAdmin,
|
||||
|
||||
@@ -3,8 +3,8 @@ import { Redirect } from 'react-router-dom'
|
||||
|
||||
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'
|
||||
import { useStepNav } from '../../../../../packages/ui/src/elements/StepNav'
|
||||
import { useConfig } from '../../../../../packages/ui/src/providers/Config'
|
||||
|
||||
const CustomDefaultEditView: AdminViewComponent = ({
|
||||
canAccessAdmin,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react'
|
||||
|
||||
import Button from '../../../../../packages/payload/src/admin/components/elements/Button'
|
||||
import { Button } from '../../../../../packages/ui/src/elements/Button'
|
||||
import { useConfig } from '../../../../../packages/ui/src/providers/Config'
|
||||
// As this is the demo project, we import our dependencies from the `src` directory.
|
||||
import MinimalTemplate from '../../../../../packages/payload/src/admin/components/templates/Minimal'
|
||||
import { useConfig } from '../../../../../packages/payload/src/admin/components/utilities/Config'
|
||||
import { MinimalTemplate } from '../../../../../packages/ui/src/templates/Minimal'
|
||||
|
||||
// In your projects, you can import as follows:
|
||||
// import { MinimalTemplate } from 'payload/components/templates';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { Fragment, useEffect } from 'react'
|
||||
|
||||
import { useStepNav } from '../../../../../packages/payload/src/admin/components/elements/StepNav'
|
||||
import { type AdminViewComponent } from '../../../../../packages/payload/src/config/types'
|
||||
import { useStepNav } from '../../../../../packages/ui/src/elements/StepNav'
|
||||
import { customTabViewTitle } from '../../../shared'
|
||||
|
||||
const CustomTabView: AdminViewComponent = () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { Fragment, useEffect } from 'react'
|
||||
|
||||
import { useStepNav } from '../../../../../packages/payload/src/admin/components/elements/StepNav'
|
||||
import { type AdminViewComponent } from '../../../../../packages/payload/src/config/types'
|
||||
import { useStepNav } from '../../../../../packages/ui/src/elements/StepNav'
|
||||
import { customTabViewTitle } from '../../../shared'
|
||||
|
||||
const CustomTabView2: AdminViewComponent = () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { Fragment, useEffect } from 'react'
|
||||
|
||||
import { useStepNav } from '../../../../../packages/payload/src/admin/components/elements/StepNav'
|
||||
import { type AdminViewComponent } from '../../../../../packages/payload/src/config/types'
|
||||
import { useStepNav } from '../../../../../packages/ui/src/elements/StepNav'
|
||||
import { customNestedTabViewTitle } from '../../../shared'
|
||||
|
||||
const CustomNestedTabView: AdminViewComponent = () => {
|
||||
|
||||
@@ -3,8 +3,8 @@ import { Redirect } from 'react-router-dom'
|
||||
|
||||
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'
|
||||
import { useStepNav } from '../../../../../packages/ui/src/elements/StepNav'
|
||||
import { useConfig } from '../../../../../packages/ui/src/providers/Config'
|
||||
|
||||
const CustomVersionsView: AdminViewComponent = ({
|
||||
canAccessAdmin,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React, { useCallback } from 'react'
|
||||
|
||||
import type { EditViewProps as Props } from '../../packages/ui/src'
|
||||
import type { EditViewProps as Props } from '../../packages/payload/src/config/types'
|
||||
|
||||
import { EditView as DefaultEditView } from '../../packages/next/src/views/Edit'
|
||||
import { useAuth } from '../../packages/ui/src/providers/Auth'
|
||||
import { DefaultEditView } from '../../packages/ui/src/views/Edit'
|
||||
|
||||
const GlobalView: React.FC<Props> = (props) => {
|
||||
const { onSave } = props
|
||||
|
||||
Reference in New Issue
Block a user