Skip to content

Commit 970640b

Browse files
authored
Merge pull request #8263 from tejaswiverma121-byte/fix/brand-sidebar-navigation
[Brand] fix: remove inactive sidebar navigation links and unused refs
2 parents 36cb735 + 5035b6f commit 970640b

1 file changed

Lines changed: 0 additions & 53 deletions

File tree

‎src/sections/Company/Brand/index.js‎

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@ import React, { useState, useEffect, useRef } from "react";
22
import BrandPageWrapper from "./brandPage.style";
33
import { Row, Col } from "../../../reusecore/Layout";
44
import Layer5Brand from "./Brand-components/layer5";
5-
// import MesheryBrand from "./Brand-components/meshery";
65
import { FiDownloadCloud } from "@react-icons/all-files/fi/FiDownloadCloud";
76
import loadable from "@loadable/component";
87

9-
// const MeshSyncBrand = loadable(() => import("./Brand-components/meshsync"));
10-
// const MesheryOperatorBrand = loadable(() => import("./Brand-components/meshery-operator"));
118
const ImageHubBrand = loadable(() => import("./Brand-components/imagehub"));
129
const SMPBrand = loadable(() => import("./Brand-components/smp"));
1310
const CommunityBrand = loadable(() => import("./Brand-components/community"));
@@ -53,8 +50,6 @@ const getDimensions = (ele) => {
5350
// Functions to make scroll with speed control
5451
// Element to move, element or px from, element or px to, time in ms to animate
5552
const scrollTo = (element, sectionId, duration = 2000) => {
56-
// Sections for disabled brand kits are commented out, so their refs
57-
// stay null. Bail out instead of throwing on element.offsetTop.
5853
if (!element) return;
5954
// Update URL hash
6055
if (sectionId) {
@@ -113,9 +108,6 @@ const Brand = () => {
113108

114109
const headerRef = useRef(null);
115110
const layer5Ref = useRef(null);
116-
const mesheryRef = useRef(null);
117-
const meshsyncRef = useRef(null);
118-
const mesheryOperatorRef = useRef(null);
119111
const imageHubRef = useRef(null);
120112
const meshMasterRef = useRef(null);
121113
const smpRef = useRef(null);
@@ -131,9 +123,6 @@ const Brand = () => {
131123

132124
const sectionRefs = [
133125
{ section: "Layer5", ref: layer5Ref },
134-
{ section: "Meshery", ref: mesheryRef },
135-
{ section: "MeshSync", ref: meshsyncRef },
136-
{ section: "MesheryOperator", ref: mesheryOperatorRef },
137126
{ section: "ImageHub", ref: imageHubRef },
138127
{ section: "SMP", ref: smpRef },
139128
{ section: "MeshMark", ref: meshmarkRef },
@@ -151,9 +140,6 @@ const Brand = () => {
151140
const sectionIdMap = {
152141
layer5: layer5Ref,
153142
"social-backgrounds": SocialBackgroundsRef,
154-
meshery: mesheryRef,
155-
meshsync: meshsyncRef,
156-
"meshery-operator": mesheryOperatorRef,
157143
"image-hub": imageHubRef,
158144
smp: smpRef,
159145
meshmark: meshmarkRef,
@@ -238,15 +224,6 @@ const Brand = () => {
238224
>
239225
<SocialBackgrounds />
240226
</div>
241-
{/* <div className="section" id="meshery" ref={mesheryRef}>
242-
<MesheryBrand />
243-
</div>
244-
<div className="section" id="meshsync" ref={meshsyncRef}>
245-
<MeshSyncBrand />
246-
</div>
247-
<div className="section" id="meshery-operator" ref={mesheryOperatorRef}>
248-
<MesheryOperatorBrand />
249-
</div> */}
250227
<div className="section" id="image-hub" ref={imageHubRef}>
251228
<ImageHubBrand />
252229
</div>
@@ -307,36 +284,6 @@ const Brand = () => {
307284
>
308285
<span> Layer5 Social Backgrounds </span>
309286
</p>
310-
<p
311-
className={`header_link ${
312-
visibleSection === "Meshery" ? "selected" : ""
313-
}`}
314-
onClick={() => {
315-
scrollTo(mesheryRef.current, "meshery");
316-
}}
317-
>
318-
<span>Meshery</span>
319-
</p>
320-
<p
321-
className={`header_link ${
322-
visibleSection === "MeshSync" ? "selected" : ""
323-
}`}
324-
onClick={() => {
325-
scrollTo(meshsyncRef.current, "meshsync");
326-
}}
327-
>
328-
<span>MeshSync</span>
329-
</p>
330-
<p
331-
className={`header_link ${
332-
visibleSection === "MesheryOperator" ? "selected" : ""
333-
}`}
334-
onClick={() => {
335-
scrollTo(mesheryOperatorRef.current, "meshery-operator");
336-
}}
337-
>
338-
<span>Meshery Operator</span>
339-
</p>
340287
<p
341288
className={`header_link ${
342289
visibleSection === "ImageHub" ? "selected" : ""

0 commit comments

Comments
 (0)