Skip to content

Commit 2b62849

Browse files
authored
Merge pull request #7235 from saurabhraghuvanshii/meshery
fix: runtime error andd images issues
2 parents e46a68b + d97781b commit 2b62849

5 files changed

Lines changed: 27 additions & 9 deletions

File tree

src/sections/Meshery/Features-Col/index.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,21 @@ const Features = () => {
6464

6565
useEffect(() => {
6666
fetch(performanceCountEndpoint)
67-
.then((response) => response.json())
68-
.then((resultcount) => setPerformanceCount(resultcount.total_runs));
67+
.then((response) => {
68+
if (!response.ok) {
69+
throw new Error(`HTTP error! status: ${response.status}`);
70+
}
71+
return response.json();
72+
})
73+
.then((resultcount) => {
74+
if (resultcount && typeof resultcount.total_runs === "number") {
75+
setPerformanceCount(resultcount.total_runs);
76+
}
77+
})
78+
.catch((error) => {
79+
console.log("Failed to fetch performance count:", error.message);
80+
// Keep default value of 0 if fetch fails
81+
});
6982
}, []);
7083

7184
const data = LifecycleFeature().features;

src/sections/Meshery/Features-section/features-section.style.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ const FeaturesSectionWrapper = styled.section`
55
background-color: black;
66
transform: skew(0deg, -6deg);
77
padding-bottom:5rem;
8-
margin-bottom: 10%;
8+
margin-bottom: 8rem;
9+
overflow: hidden;
10+
position: relative;
911
.skw{
1012
display: grid;
1113
position: relative;
@@ -164,6 +166,7 @@ const FeaturesSectionWrapper = styled.section`
164166
165167
@media screen and (max-width: 1200px) {
166168
padding-bottom: 2rem;
169+
margin-bottom: 6rem;
167170
168171
.smp-section {
169172
.smp-section-row {
@@ -191,6 +194,7 @@ const FeaturesSectionWrapper = styled.section`
191194
192195
@media screen and (max-width: 960px) {
193196
padding-bottom: 0rem;
197+
margin-bottom: 4rem;
194198
.smp-section .smp-section-caraousel .slick-slider .slick-list {
195199
.slick-slide {
196200
img {
156 KB
Loading

src/sections/Meshery/Meshery-features/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import img6 from "./feature-images/edge_mount_relationship_pod_persistent_volume
99
import { StaticImage } from "gatsby-plugin-image";
1010
import img2 from "./feature-images/workspace.gif";
1111
import multiClusterGif from "./feature-images/multi-cluster-management.gif";
12-
const img1 = "../../../assets/images/kanvas/KanvasDesigner.webp";
13-
const img4 = "./feature-images/meshery-catalog.webp";
14-
const img7 = "./feature-images/extensions.webp";
12+
import img1 from "./feature-images/KanvasDesigner.webp";
13+
import img4 from "./feature-images/meshery-catalog.webp";
14+
import img7 from "./feature-images/extensions.webp";
1515

1616
const MesheryFeaturesWrapper = styled.div`
1717
margin: auto;
@@ -50,7 +50,7 @@ const MesheryFeatures = () => {
5050
description:
5151
"Visually and collaboratively design your cloud native infrastructure using Meshery's drag-and-drop designer. Leverage 300+ integrations and context-aware relationships between components.",
5252
learnMoreLink: "/kanvas",
53-
content: <StaticImage src={img1} alt="Infrastructure as Design with Kanvas" loading="lazy" />,
53+
content: <img src={img1} alt="Infrastructure as Design with Kanvas" loading="lazy" />,
5454
},
5555
{
5656
id: "second",
@@ -79,7 +79,7 @@ const MesheryFeatures = () => {
7979
"Build your internal developer platform with Meshery's extensive extensibility. Includes REST/GraphQL APIs, gRPC adapters, hot-loadable ReactJS components, and Golang plugins.",
8080
content: (
8181
<div className="feature-expose-full">
82-
<StaticImage src={img7} alt="Platform Engineering Extension Points" loading="lazy" />
82+
<img src={img7} alt="Platform Engineering Extension Points" loading="lazy" />
8383
<p>
8484
Meshery's numerous extension points make it ideal as the foundation of your internal developer platform.
8585
Create custom models, import/export as OCI images, and extend functionality through multiple integration patterns.
@@ -114,7 +114,7 @@ const MesheryFeatures = () => {
114114
description:
115115
"Access 400+ curated design patterns and templates. Share, clone, and customize designs with built -in best practices for common deployment scenarios.", content: (
116116
<div className="feature-expose-full">
117-
<StaticImage
117+
<img
118118
src={img4}
119119
alt="Cloud Native Catalog and Patterns"
120120
loading="lazy"

src/sections/Meshery/meshery.style.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import styled from "styled-components";
33
const MesheryWrapper = styled.section`
44
position: relative;
55
z-index: 1;
6+
overflow-x: hidden;
67
.info {
78
position: relative;
89
overflow: hidden;

0 commit comments

Comments
 (0)