mirror of
https://github.com/xtr-dev/payload-feature-flags.git
synced 2025-12-10 02:43:25 +00:00
Update Payload dependencies to 3.56.0 and implement DefaultTemplate layout
- Updated all @payloadcms/* dependencies from 3.37.0 to 3.56.0 - Implemented DefaultTemplate from @payloadcms/next/templates with proper props structure - Fixed TypeScript compilation by adding proper Locale type import - Feature flags admin interface now wrapped in PayloadCMS default admin layout with navigation sidebar - Verified build process works with updated dependencies 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,8 @@ import {
|
||||
useConfig,
|
||||
useTheme
|
||||
} from '@payloadcms/ui'
|
||||
import { DefaultTemplate } from '@payloadcms/next/templates'
|
||||
import type { Locale } from 'payload'
|
||||
|
||||
interface FeatureFlag {
|
||||
id: string
|
||||
@@ -24,6 +26,14 @@ interface FeatureFlag {
|
||||
}
|
||||
|
||||
interface FeatureFlagsViewProps {
|
||||
i18n?: any
|
||||
locale?: Locale
|
||||
params?: Record<string, any>
|
||||
payload?: any
|
||||
permissions?: any
|
||||
searchParams?: Record<string, any>
|
||||
user?: any
|
||||
visibleEntities?: any
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
@@ -615,8 +625,21 @@ const FeatureFlagsViewComponent = (props: FeatureFlagsViewProps = {}) => {
|
||||
</div>
|
||||
)
|
||||
|
||||
// Return the content directly - Payload handles the admin layout for custom views
|
||||
return <FeatureFlagsContent />
|
||||
// Use DefaultTemplate with proper props structure
|
||||
return (
|
||||
<DefaultTemplate
|
||||
i18n={props.i18n}
|
||||
locale={props.locale}
|
||||
params={props.params}
|
||||
payload={props.payload}
|
||||
permissions={props.permissions}
|
||||
searchParams={props.searchParams}
|
||||
user={props.user}
|
||||
visibleEntities={props.visibleEntities}
|
||||
>
|
||||
<FeatureFlagsContent />
|
||||
</DefaultTemplate>
|
||||
)
|
||||
}
|
||||
|
||||
export const FeatureFlagsView = memo(FeatureFlagsViewComponent)
|
||||
|
||||
Reference in New Issue
Block a user