chore: remove some default exports

This commit is contained in:
Alessio Gravili
2024-03-18 15:50:53 -04:00
parent d08d04debd
commit 4e650e17aa
3 changed files with 5 additions and 9 deletions

View File

@@ -18,7 +18,7 @@ import { v4 as uuidv4 } from 'uuid'
const path = 'apiKey' const path = 'apiKey'
const baseClass = 'api-key' const baseClass = 'api-key'
const APIKey: React.FC<{ readOnly?: boolean }> = ({ readOnly }) => { export const APIKey: React.FC<{ readOnly?: boolean }> = ({ readOnly }) => {
const [initialAPIKey, setInitialAPIKey] = useState(null) const [initialAPIKey, setInitialAPIKey] = useState(null)
const [highlightedField, setHighlightedField] = useState(false) const [highlightedField, setHighlightedField] = useState(false)
const { t } = useTranslation() const { t } = useTranslation()
@@ -107,5 +107,3 @@ const APIKey: React.FC<{ readOnly?: boolean }> = ({ readOnly }) => {
</React.Fragment> </React.Fragment>
) )
} }
export default APIKey

View File

@@ -15,12 +15,12 @@ import { toast } from 'react-toastify'
import type { Props } from './types.js' import type { Props } from './types.js'
import APIKey from './APIKey.js' import { APIKey } from './APIKey.js'
import './index.scss' import './index.scss'
const baseClass = 'auth-fields' const baseClass = 'auth-fields'
const Auth: React.FC<Props> = (props) => { export const Auth: React.FC<Props> = (props) => {
const { const {
className, className,
collectionSlug, collectionSlug,
@@ -45,7 +45,7 @@ const Auth: React.FC<Props> = (props) => {
} = useConfig() } = useConfig()
const handleChangePassword = useCallback( const handleChangePassword = useCallback(
async (state: boolean) => { (state: boolean) => {
if (!state) { if (!state) {
dispatchFields({ type: 'REMOVE', path: 'password' }) dispatchFields({ type: 'REMOVE', path: 'password' })
dispatchFields({ type: 'REMOVE', path: 'confirm-password' }) dispatchFields({ type: 'REMOVE', path: 'confirm-password' })
@@ -163,5 +163,3 @@ const Auth: React.FC<Props> = (props) => {
</div> </div>
) )
} }
export default Auth

View File

@@ -23,7 +23,7 @@ import React, { Fragment, useCallback } from 'react'
import { LeaveWithoutSaving } from '../../../elements/LeaveWithoutSaving/index.js' import { LeaveWithoutSaving } from '../../../elements/LeaveWithoutSaving/index.js'
// import { getTranslation } from '@payloadcms/translations' // import { getTranslation } from '@payloadcms/translations'
import Auth from './Auth/index.js' import { Auth } from './Auth/index.js'
import { SetDocumentTitle } from './SetDocumentTitle/index.js' import { SetDocumentTitle } from './SetDocumentTitle/index.js'
import { SetStepNav } from './SetStepNav/index.js' import { SetStepNav } from './SetStepNav/index.js'
import './index.scss' import './index.scss'