Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 10 months ago

Responsive Social Link Card using Next, React, TailwindCSS, HTML5...

next, tailwind-css, react
yyuntzpan•40
@yyuntzpan
A solution to the Social links profile challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

This time, I tried using NEXT.js, REACT, and tailwind CSS. Tailwind CSS, in particular, was my first time using it. Although I wasn’t very familiar with it, and it was supposed to speed up the process, I ended up spending a lot of time reading the documentation. This time, I practiced building a React project with Next. Next time, I would like to try using Vite to create a Vue project for practice.

What challenges did you encounter, and how did you overcome them?

In previous challenges, I only used native HTML and CSS. This time, I tried using NEXT.js, REACT, and tailwind CSS for practice, and I encountered many issues. The most troublesome problem was setting the font. I usually just include the CDN directly in the HTML head for convenience, but after using the framework, I wasn’t sure how to proceed. After reading some documentation and discussing it with Gemini, I ended up using the "Next.js built-in font optimization" feature to set the fonts.

What specific areas of your project would you like help with?
  1. There are several ways to set fonts, such as using "Next.js built-in font optimization" or using a global CSS file. I’m not sure which method to choose in different situations, and I’m also unclear on how to implement each method.
  2. Should I use a framework when practicing layout design? Using a framework and TailwindCSS ended up taking more time for me...
  3. When using TailwindCSS with global CSS settings, should I aim to use TailwindCSS as much as possible for the style guide, or is it better to use traditional CSS methods in the global stylesheet? Although both methods can achieve the goal, is there a clear advantage to one over the other? Is there a standard process?
Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    Jeff•70
    @Yunlearning
    Posted 4 months ago

    Your overall solution is excellent! However, I noticed a few minor issues that could be improved. Here are some areas for refinement:

    1. Potential Typo in display Class Name Issue:
    className = 'block displaty-block w-full text-sm font-semibold ...';
    

    Solution:

    className = 'block w-full text-sm font-semibold ...';
    

    The incorrect spelling of displaty-block should be corrected to just block, as display-block is not a valid CSS class. 2. Extra Quotation Marks in bio String Issue:

    bio: '"Front-end developer and avid reader."',
    

    Solution:

    bio: "Front-end developer and avid reader.",
    

    The extra quotation marks around the string are unnecessary and should be removed for proper formatting. 3. Using url as the key in socialsLinks.map Issue:

    {profileData.socialsLinks.map((social) => (
        <li key={social.name}>
    

    Using name as the key could lead to potential duplication issues if multiple social links have the same name. Solution:

    {profileData.socialsLinks.map((social) => (
      <li key={social.url}>
    

    Replacing name with url ensures each key is unique, preventing potential rendering issues in React. This version improves clarity and readability while keeping the feedback concise and professional. 🚀

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SASS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub