Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Commit cf71717

Browse files
deepsource-autofix[bot]Naya Singhania
authored andcommitted
refactor: remove extra closing tags
Components without children can be self-closed to avoid the unnecessary extra closing tag. In JSX, closing tags are required when the component has children example `<MyComponent>...</MyComponent>` and if there are no child component between these tags, then this component can be self closed using `<MyComponent />`. It is recommended as it improves readability, and it is more compact to use self-closing for these types of components.
1 parent 5e2aab2 commit cf71717

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default function RootLayout({
3636
async
3737
src="https://www.googletagmanager.com/gtag/js?id=G-5C6EN7BR23"
3838
strategy="lazyOnload"
39-
></Script>
39+
/>
4040
<Script id="google-analytics" strategy="lazyOnload">
4141
{`
4242
window.dataLayer = window.dataLayer || [];

components/user-nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function UserNav() {
3838
>
3939
<Avatar className="h-8 w-8">
4040
<AvatarImage src={image} alt="@shadcn" />
41-
<AvatarFallback></AvatarFallback>
41+
<AvatarFallback />
4242
</Avatar>
4343
</Button>
4444
</DropdownMenuTrigger>

0 commit comments

Comments
 (0)