+ {/* Generate Button */}
+
+ {
+ // Check if 'tms' is selected and tmsUrl is not empty
+ if (selectedTileSource === 'tms' && !tmsUrl) {
+ // Handle error, TMS URL is required
+ console.log('TMS URL is required');
+ return;
+ }
- dispatch(
- GenerateProjectTiles(
- `${
- import.meta.env.VITE_API_URL
- }/projects/tiles/${decodedId}?source=${selectedTileSource}&format=${selectedOutputFormat}&tms=${tmsUrl}`,
- decodedId,
- ),
- );
- }}
- >
- Generate
-
-
+ dispatch(
+ GenerateProjectTiles(
+ `${
+ import.meta.env.VITE_API_URL
+ }/projects/tiles/${decodedId}?source=${selectedTileSource}&format=${selectedOutputFormat}&tms=${tmsUrl}`,
+ decodedId,
+ ),
+ );
+ }}
+ >
+ Generate
+
+
- {/* Refresh Button */}
-
- {
- getTilesList();
- }}
- >
- Refresh
-
+ {/* Refresh Button */}
+
+ {
+ getTilesList();
+ }}
+ >
+ Refresh
+
+
+
+