Skip to content

Conversation

@fridascript
Copy link

@fridascript fridascript commented Nov 28, 2025


useEffect(() => {
if (blog.description) {
fetch(blog.description)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole fetching of local markdown files feels a bit funky. You could have just imported them :)

))}

<ToggleButton $active={showAll} onClick={() => setShowAll(!showAll)}>
{!showAll && <TogglebtnIcon><ArrowIcon aria-hidden="true" /></TogglebtnIcon>}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A tip! This could have been written with one condition:

{showAll 
    ? "Show fewer" 
    : (
        <>
            <TogglebtnIcon><ArrowIcon aria-hidden="true" /></TogglebtnIcon>
            See more articles
        </>
    )
}

<ProjectCard key={i} project={project} />
))}

<ToggleButton $active={showAll} onClick={() => setShowAll(!showAll)}>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to use the previous state! setShowAll(show => !show)

@@ -1,4 +1,16 @@
/* global base styles */
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could have been put into styled components GlobalStyles :)

Copy link

@Npahlfer Npahlfer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done! Clever use of the theme and you use the styled props. Easy to read.
Some small improvements that I have commented on, but overall good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants