Skip to content

Commit e9d0a98

Browse files
committed
fix(fe): links in new window (#2992)
### TL;DR Added `target="_blank"` and `rel="noopener noreferrer"` to Discord and GitHub links in the sidebar. ### What changed? - Removed unused icon imports (`faCheck` and `faTriangleExclamation`) - Added `target="_blank"` and `rel="noopener noreferrer"` attributes to the Discord and GitHub links in the sidebar to ensure they open in new tabs ### How to test? 1. Navigate to any page with the sidebar 2. Click on either the Discord or GitHub links 3. Verify that they open in a new tab instead of replacing the current page ### Why make this change? This improves user experience by allowing users to visit external resources without losing their current context in the application. The `rel="noopener noreferrer"` attribute also adds security by preventing the new tab from accessing the window.opener property.
1 parent 99d9295 commit e9d0a98

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

frontend/src/app/layout.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import {
22
faArrowUpRight,
3-
faCheck,
43
faLink,
54
faServer,
65
faSpinnerThird,
7-
faTriangleExclamation,
86
Icon,
97
} from "@rivet-gg/icons";
108
import { useQuery } from "@tanstack/react-query";
@@ -197,7 +195,13 @@ const Sidebar = ({
197195
/>
198196
}
199197
>
200-
<a href="http://rivet.gg/discord">Discord</a>
198+
<a
199+
href="http://rivet.gg/discord"
200+
target="_blank"
201+
rel="noopener noreferrer"
202+
>
203+
Discord
204+
</a>
201205
</Button>
202206
<Button
203207
variant="ghost"
@@ -210,7 +214,11 @@ const Sidebar = ({
210214
/>
211215
}
212216
>
213-
<a href="http://github.com/rivet-gg/rivet">
217+
<a
218+
href="http://github.com/rivet-gg/rivet"
219+
target="_blank"
220+
rel="noopener noreferrer"
221+
>
214222
GitHub
215223
</a>
216224
</Button>

0 commit comments

Comments
 (0)