mirror of
				https://github.com/karl0ss/homepage.git
				synced 2025-11-04 08:20:58 +00:00 
			
		
		
		
	Fix: calendar widget radarr integration API params invalid (#2470)
This commit is contained in:
		
							parent
							
								
									25767ba3c7
								
							
						
					
					
						commit
						15a12763f8
					
				@ -52,15 +52,18 @@ export default function Component({ service }) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  // params for API fetch
 | 
					  // params for API fetch
 | 
				
			||||||
  const params = useMemo(() => {
 | 
					  const params = useMemo(() => {
 | 
				
			||||||
    if (!showDate) {
 | 
					    const constructedParams = {
 | 
				
			||||||
      return {};
 | 
					      start: "",
 | 
				
			||||||
 | 
					      end: "",
 | 
				
			||||||
 | 
					      unmonitored: false,
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (showDate) {
 | 
				
			||||||
 | 
					      constructedParams.start = showDate.minus({ months: 3 }).toFormat("yyyy-MM-dd");
 | 
				
			||||||
 | 
					      constructedParams.end = showDate.plus({ months: 3 }).toFormat("yyyy-MM-dd");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return {
 | 
					    return constructedParams;
 | 
				
			||||||
      start: showDate.minus({ months: 3 }).toFormat("yyyy-MM-dd"),
 | 
					 | 
				
			||||||
      end: showDate.plus({ months: 3 }).toFormat("yyyy-MM-dd"),
 | 
					 | 
				
			||||||
      unmonitored: "false",
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  }, [showDate]);
 | 
					  }, [showDate]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Load active integrations
 | 
					  // Load active integrations
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user