Skip to content

Commit 8d18eea

Browse files
committed
Update NeonPage.jsx
1 parent a009660 commit 8d18eea

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/lib_components/components/NeonPage/NeonPage.jsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -418,12 +418,7 @@ const NeonPage = (props) => {
418418
const sidebarHashMap = !hasSidebarLinks ? {} : Object.fromEntries(
419419
sidebarLinks.map((link, idx) => [link.hash || '#', idx]),
420420
);
421-
const initialCurrentSidebarHash = (() => {
422-
if (sidebarLinks.length === 5) {
423-
return sidebarLinks[3].hash;
424-
}
425-
return '#';
426-
})();
421+
const initialCurrentSidebarHash = hasSidebarLinks ? sidebarLinks[0].hash || '#' : '#';
427422
const currentSidebarHash = initialCurrentSidebarHash;
428423
// const [currentSidebarHash, setCurrentSidebarHash] = useState(initialCurrentSidebarHash);
429424
const [hashInitialized, setHashInitialized] = useState(false);

0 commit comments

Comments
 (0)