Created
November 19, 2023 11:23
-
-
Save DewofyourYouth/367c4e65170145aa0400268f285e0351 to your computer and use it in GitHub Desktop.
Too Many Props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function UserPanel({ | |
firstName, | |
lastName, | |
company, | |
department, | |
active, | |
permissions, | |
}) { | |
return ( | |
<> | |
<head> | |
<title> | |
{company} User Panel || {department} Dept. | |
</title> | |
</head> | |
<div id="user-panel"> | |
<h1> | |
Welcome {firstName} {lastName}! | |
</h1> | |
<p> | |
{permissions.includes("admin") && active && ( | |
<a href="/admin">Go To Admin</a> | |
)} | |
</p> | |
</div> | |
</> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment