feat: link to the forum

This commit is contained in:
Jean-Philippe Sirois
2020-01-03 00:13:09 -08:00
parent a15459ca36
commit e2dfaaf9a6
4 changed files with 43 additions and 4 deletions
+12
View File
@@ -14,6 +14,15 @@ interface IMenuItemProps {
}
const MenuItem: FC<IMenuItemProps> = ({ children, to }) => {
if (to.match(/^(https?:\/\/)/)) {
return (
<SC.MenuItemExternal href={to} target="_blank">
<SC.MenuItemText>{children}</SC.MenuItemText>
<SC.MenuItemLine />
</SC.MenuItemExternal>
)
}
return (
<SC.MenuItem
to={to}
@@ -85,6 +94,9 @@ export const HomeHeader: FC<IHomeHeaderProps> = ({ isHome }) => {
<MenuItem to="/rules">rules</MenuItem>
<MenuItem to="/resources">resources</MenuItem>
<MenuItem to="/archives">tech spotlights</MenuItem>
<MenuItem to="https://forum.theprogrammershangout.com">
forum
</MenuItem>
</SC.Menu>
<DiscordButton>join us</DiscordButton>
{isHome && <HomePartner />}