Add shared Next.js config props type

This commit is contained in:
2026-01-18 01:25:37 +00:00
parent 902253a9be
commit 9cd0ed818a
4 changed files with 12 additions and 21 deletions

View File

@@ -1,18 +1,13 @@
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { NextJsConfig } from '@/types/project'
import projectSettingsCopy from '@/data/project-settings.json'
interface NextJsApplicationCardProps {
nextjsConfig: NextJsConfig
onNextjsConfigChange: (config: NextJsConfig | ((current: NextJsConfig) => NextJsConfig)) => void
}
import { NextJsConfigSectionProps } from '@/components/project-settings/types'
export function NextJsApplicationCard({
nextjsConfig,
onNextjsConfigChange,
}: NextJsApplicationCardProps) {
}: NextJsConfigSectionProps) {
const { application } = projectSettingsCopy.nextjs
return (

View File

@@ -1,16 +1,11 @@
import { NextJsConfig } from '@/types/project'
import { NextJsApplicationCard } from '@/components/project-settings/NextJsApplicationCard'
import { NextJsFeaturesCard } from '@/components/project-settings/NextJsFeaturesCard'
interface NextJsConfigTabProps {
nextjsConfig: NextJsConfig
onNextjsConfigChange: (config: NextJsConfig | ((current: NextJsConfig) => NextJsConfig)) => void
}
import { NextJsConfigSectionProps } from '@/components/project-settings/types'
export function NextJsConfigTab({
nextjsConfig,
onNextjsConfigChange,
}: NextJsConfigTabProps) {
}: NextJsConfigSectionProps) {
return (
<div className="max-w-2xl space-y-6">
<NextJsApplicationCard

View File

@@ -1,18 +1,13 @@
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
import { Label } from '@/components/ui/label'
import { Switch } from '@/components/ui/switch'
import { NextJsConfig } from '@/types/project'
import projectSettingsCopy from '@/data/project-settings.json'
interface NextJsFeaturesCardProps {
nextjsConfig: NextJsConfig
onNextjsConfigChange: (config: NextJsConfig | ((current: NextJsConfig) => NextJsConfig)) => void
}
import { NextJsConfigSectionProps } from '@/components/project-settings/types'
export function NextJsFeaturesCard({
nextjsConfig,
onNextjsConfigChange,
}: NextJsFeaturesCardProps) {
}: NextJsConfigSectionProps) {
const { features } = projectSettingsCopy.nextjs
return (

View File

@@ -0,0 +1,6 @@
import { NextJsConfig } from '@/types/project'
export type NextJsConfigSectionProps = {
nextjsConfig: NextJsConfig
onNextjsConfigChange: (config: NextJsConfig | ((current: NextJsConfig) => NextJsConfig)) => void
}