Unverified Commit d8732b9f authored by Hyungji's avatar Hyungji Committed by GitHub

fix: remove unnecessary fragment (#72492)

Hi, Team.

I'd like to contribute as removing unnecessary fragments.
I believe that the fragment will create one more grouping node on
virtual dom, which is not necessary on this example.

If it is essential, please kindly let me know why.

Thank you so much for your support.

### Improving Documentation
- remove unnecessary fragment tags
Co-authored-by: 's avatarDelba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
parent 691eeae8
......@@ -154,7 +154,7 @@ export default function Layout({
admin: React.ReactNode
}) {
const role = checkUserRole()
return <>{role === 'admin' ? admin : user}</>
return role === 'admin' ? admin : user
}
```
......@@ -163,7 +163,7 @@ import { checkUserRole } from '@/lib/auth'
export default function Layout({ user, admin }) {
const role = checkUserRole()
return <>{role === 'admin' ? admin : user}</>
return role === 'admin' ? admin : user
}
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment