Skip to content

Commit f0c8630

Browse files
committed
🔧 Minor Fixes
1 parent e140243 commit f0c8630

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
- [x] Shows custom thumbnail when sharing url on WhatsApp/Social Media using Open Graph Metadata Protocol
2020
- [x] Automatically changes theme based on device `Dark Mode` setting (stackoverflow does not seem to have this feature).
2121
- [x] SVG icons changes colors automatically based on selected theme.
22-
- [x] Fully [ Responsive Design ] (https://en.wikipedia.org/wiki/Responsive_web_design) - Adapts to different viewports
22+
- [x] Fully [ Responsive Design ](https://en.wikipedia.org/wiki/Responsive_web_design) - Adapts to different viewports
2323
- [x] Better [ accessibility ](https://en.wikipedia.org/wiki/Web_accessibility) for keyboard users
2424
- [x] Implemented XML like component abstaction for data on `./world/workshop.tsx`
2525
- [x] Implemented JSON file reading for data on `./world/skills.tsx`

‎world/skills.tsx‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ export default function Skills() {
7272
const skillElements = [];
7373
if (skills) {
7474
for (const [title, skillList] of Object.entries(skills)) {
75-
skillElements.push(
76-
...skillList.map((skill, index) => (
75+
// Using loops over .map() as Heap/GC allocation in JS is expensive.
76+
for (let index = 0; index < skillList.length; index++) {
77+
const skill = skillList[index];
78+
skillElements.push(
7779
<div
7880
key={`${title}-${index}`}
7981
className="place-content-center p-5 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 dark:bg-[#161D1F] dark:border-gray-700 dark:hover:bg-gray-700"
@@ -89,8 +91,8 @@ export default function Skills() {
8991
height={100}
9092
/>
9193
</div>
92-
)),
93-
);
94+
);
95+
}
9496
}
9597
}
9698
return skillElements;

0 commit comments

Comments
 (0)