mirror of
				https://github.com/karl0ss/homepage.git
				synced 2025-11-04 00:10:57 +00:00 
			
		
		
		
	Unifi widget: Show a more helpful error if specified site not found (#2839)
This commit is contained in:
		
							parent
							
								
									259d0f1bb9
								
							
						
					
					
						commit
						8eb61ef9ff
					
				@ -20,6 +20,10 @@ export default function Component({ service }) {
 | 
				
			|||||||
    : statsData?.data?.find((s) => s.name === "default");
 | 
					    : statsData?.data?.find((s) => s.name === "default");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (!defaultSite) {
 | 
					  if (!defaultSite) {
 | 
				
			||||||
 | 
					    if (widget.site) {
 | 
				
			||||||
 | 
					      return <Container service={service} error={{ message: `Site '${widget.site}' not found` }} />;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return (
 | 
					    return (
 | 
				
			||||||
      <Container service={service}>
 | 
					      <Container service={service}>
 | 
				
			||||||
        <Block label="unifi.uptime" />
 | 
					        <Block label="unifi.uptime" />
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user