File tree Expand file tree Collapse file tree
pages/dashboard/project/[projectId]/services/compose Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export const ShowEnvironment = ({ applicationId }: Props) => {
4949 currentBuildArgs !== ( data ?. buildArgs || "" ) ;
5050
5151 useEffect ( ( ) => {
52- if ( data ) {
52+ if ( data && ! hasChanges ) {
5353 form . reset ( {
5454 env : data . env || "" ,
5555 buildArgs : data . buildArgs || "" ,
Original file line number Diff line number Diff line change @@ -44,8 +44,10 @@ export const ComposeFileEditor = ({ composeId }: Props) => {
4444 resolver : zodResolver ( AddComposeFile ) ,
4545 } ) ;
4646
47+ const composeFile = form . watch ( "composeFile" ) ;
48+
4749 useEffect ( ( ) => {
48- if ( data ) {
50+ if ( data && ! composeFile ) {
4951 form . reset ( {
5052 composeFile : data . composeFile || "" ,
5153 } ) ;
Original file line number Diff line number Diff line change @@ -74,12 +74,7 @@ const Service = (
7474 }
7575 } , [ router . query . tab ] ) ;
7676
77- const { data } = api . compose . one . useQuery (
78- { composeId } ,
79- {
80- refetchInterval : 5000 ,
81- } ,
82- ) ;
77+ const { data } = api . compose . one . useQuery ( { composeId } ) ;
8378
8479 const { data : auth } = api . user . get . useQuery ( ) ;
8580 const { data : isCloud } = api . settings . isCloud . useQuery ( ) ;
You can’t perform that action at this time.
0 commit comments