@@ -16,6 +16,7 @@ import { Close } from "@mui/icons-material"
1616
1717import { LinkConfig } from "@/lib/services/linkConfig"
1818import { ConfirmButton } from "../ConfirmButton"
19+ import { Destination } from "../Destination"
1920
2021export interface EditModalProps {
2122 open : boolean
@@ -29,6 +30,7 @@ const EditModal = ({ open, onClose, config }: EditModalProps): JSX.Element => {
2930 const [ seoTitle , setSeoTitle ] = useState ( config ?. seo ?. title || "" )
3031 const [ seoDescription , setSeoDescription ] = useState ( config ?. seo ?. description || "" )
3132 const [ seoMedia , setSeoMedia ] = useState ( config ?. seo ?. media || "" )
33+ const [ destinationValue , setDestinationValue ] = useState ( config ?. destinations ?. [ 0 ] ?. value || "" )
3234
3335 const [ error , setError ] = useState ( "" )
3436 const [ isLoading , setIsLoading ] = useState ( false )
@@ -56,7 +58,10 @@ const EditModal = ({ open, onClose, config }: EditModalProps): JSX.Element => {
5658 description : seoDescription || "" ,
5759 media : seoMedia || "" ,
5860 } ,
59- destinations : [ ] ,
61+ destinations : [ {
62+ platform : "web" ,
63+ value : destinationValue ,
64+ } ] ,
6065 } ) ,
6166 } )
6267
@@ -124,6 +129,13 @@ const EditModal = ({ open, onClose, config }: EditModalProps): JSX.Element => {
124129 onChange = { ( e ) => setName ( e . target . value ) }
125130 />
126131
132+ < Box my = { 2 } >
133+ < Typography variant = "subtitle1" > Destinations</ Typography >
134+ { /* <Repeater onAdd, onRemove, items={config.destinations}, renderChild /> */ }
135+ < Destination platform = "web" value = { destinationValue } onChange = { val => setDestinationValue ( val ) } />
136+
137+ </ Box >
138+
127139 < Box my = { 2 } >
128140 < Typography variant = "subtitle1" > SEO Settings</ Typography >
129141
0 commit comments