Kaynağa Gözat

change copy for no preview environments (#3831)

Feroze Mohideen 2 yıl önce
ebeveyn
işleme
48879891d8

+ 5 - 1
dashboard/src/main/home/cluster-dashboard/preview-environments/v2/PreviewEnvGrid.tsx

@@ -46,11 +46,15 @@ const PreviewEnvGrid: React.FC<PreviewEnvGridProps> = ({
   }, [deploymentTargets, searchValue, sort]);
   }, [deploymentTargets, searchValue, sort]);
 
 
   if (filteredEnvs.length === 0) {
   if (filteredEnvs.length === 0) {
+    let copy = "No preview environments exist. To get started with preview environments, enable them in the Settings tab of an existing application."
+    if (searchValue !== "") {
+      copy = "No matching environments were found."
+    }
     return (
     return (
       <Fieldset>
       <Fieldset>
         <Container row>
         <Container row>
           <PlaceholderIcon src={notFound} />
           <PlaceholderIcon src={notFound} />
-          <Text color="helper">No matching environments were found.</Text>
+          <Text color="helper">{copy}</Text>
         </Container>
         </Container>
       </Fieldset>
       </Fieldset>
     );
     );