Refactor: Simplify conditional rendering in FetchApi component

This commit is contained in:
M1000fr 2024-12-13 18:39:49 +01:00
parent 52fc2b5e07
commit bc880295c4

View File

@ -21,15 +21,11 @@ export const FetchApi = () => {
> >
Fetch API Fetch API
</button> </button>
<div className="mt-4">
{date ? ( {date ? (
<p className="text-white">Server time: {date}</p> <p>Server time: {date}</p>
) : ( ) : (
<p className="text-white"> <p>Click the button to fetch the API</p>
Click the button to fetch the API
</p>
)} )}
</div> </div>
</div>
); );
}; };