All checks were successful
		
		
	
	Playwright Tests / test (pull_request) Has been skipped
				
			Check usage of free licenses / build-static-assets (pull_request) Successful in 1m12s
				
			Add copyright notice / copyright_notice (pull_request) Successful in 1m32s
				
			Build Nginx-based docker image / build-static-assets (push) Successful in 6m2s
				
			
		
			
				
	
	
		
			26 lines
		
	
	
		
			711 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			711 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| /* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/
 | |
| 
 | |
| 'use client'
 | |
| 
 | |
| import { GlobalSummary as Summary } from '@/app/lib/definitions';
 | |
| import { getSlug } from '@/app/lib/utils';
 | |
| import GlobalSummary from '@/app/ui/dashboard/global-summary';
 | |
| import { useEffect, useState } from 'react';
 | |
| 
 | |
| export default function Page() {
 | |
|   const [globalSummary, setGlobalSummary] = useState<Summary | undefined>(undefined);
 | |
| 
 | |
|   function refreshSummary() {
 | |
|     fetch(`/api/${getSlug()}/summary`)
 | |
|       .then((response) => response.json())
 | |
|       .then((data) => {
 | |
|         setGlobalSummary(data);
 | |
|       })
 | |
|   }
 | |
| 
 | |
|   useEffect(refreshSummary, []);
 | |
| 
 | |
|   return (
 | |
|     globalSummary && <GlobalSummary summary={globalSummary} />
 | |
|   );
 | |
| } |