File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -968,10 +968,13 @@ function ConfigButton() {
968968 ` ,
969969 { refetchQueries : [ "RepoConfig" ] }
970970 ) ;
971+ const [ str , setStr ] = useState ( "" ) ;
972+
971973 useEffect ( ( ) => {
972974 // console.log(data);
973975 if ( data ) {
974976 dispatch ( repoSlice . actions . setRepoConfig ( JSON . parse ( data . repoConfig ) ) ) ;
977+ setStr ( data . repoConfig ) ;
975978 }
976979 } , [ data ] ) ;
977980 const repoConfig = useSelector ( ( state ) => state . repo . repoConfig ) ;
@@ -1032,6 +1035,25 @@ function ConfigButton() {
10321035 < Typography id = "modal-modal-description" sx = { { mt : 2 } } >
10331036 Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
10341037 </ Typography >
1038+ < MyMonaco
1039+ onChange = { ( value ) => {
1040+ // dispatch(repoSlice.actions.setRepoConfig(value));
1041+ setStr ( value ) ;
1042+ } }
1043+ value = { str }
1044+ > </ MyMonaco >
1045+ < Button
1046+ onClick = { ( ) => {
1047+ updateRepoConfig ( {
1048+ variables : {
1049+ reponame,
1050+ config : JSON . stringify ( JSON . parse ( str ) ) ,
1051+ } ,
1052+ } ) ;
1053+ } }
1054+ >
1055+ Save
1056+ </ Button >
10351057 </ Box >
10361058 </ Modal >
10371059 </ div >
You can’t perform that action at this time.
0 commit comments