mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-24 13:44:54 +00:00
Add shared Next.js config props type
This commit is contained in:
@@ -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 (
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 (
|
||||
|
||||
6
src/components/project-settings/types.ts
Normal file
6
src/components/project-settings/types.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { NextJsConfig } from '@/types/project'
|
||||
|
||||
export type NextJsConfigSectionProps = {
|
||||
nextjsConfig: NextJsConfig
|
||||
onNextjsConfigChange: (config: NextJsConfig | ((current: NextJsConfig) => NextJsConfig)) => void
|
||||
}
|
||||
Reference in New Issue
Block a user