@htmlHxcker
Posted
Hi Fola, really nice work here, In fact, I had to look very closely to find errors :), anyways here are the things I noticed:
- For the file structure: You have a global folder in the Components folder which houses Global components but then there's another folder that houses Global styles, don't you think it'll be better if the global style was in the same folder as the global components?
- Some pages take a lot of time to load their Images as much as 4 seconds which end up causing content shifts when the image loads, I think this is because you wait for data to be loaded, do you think you could load all the images once the page loads for the first time before the user starts navigating to other pages as this happens when I go to other pages e,g the about page, Perhaps you could use a preloader too.
- On the contact page, If I input a phone number in the international format i.e +1 (408) 735-7638 I get the error: "Phone should be a number!" This is kinda weird, upon inspecting I found that: I. You used a type attribute set to text instead of tel and, ii. You're using isNan to validate the numbers, I think you could fix this one by using RegExp as you did for email. Here's a function to that effect:
let formatted = (' ' + phoneNumberString).replace(/\D/g, ' ');
let match = formattedmatch(/^(1|)?(\d{3})(\d{3})(\d{4})$/);
if (match) {
let intlCode = (match[1] ? '+1 ' : '');
return [intlCode, ' (', match[2], ') ', match[3], '-', match[4]].join(' ');
}
return null;
}
Gotten from https://stackoverflow.com/questions/8358084/regular-expression-to-reformat-a-us-phone-number-in-javascript
That's as many faults as I could find, I have to say the project is very polished and the code is very easy to read so props for that.
Marked as helpful
@folathecoder
Posted
@Hakymreality Thank you very much! I will make corrections ASAP. I appreciate the feedback! 😎