mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 09:15:58 +02:00
content(resources): add link to GitHub
This commit is contained in:
@@ -7,5 +7,15 @@ export function ResourcesLink({
|
||||
}: PropsWithChildren<{
|
||||
to: string
|
||||
}>) {
|
||||
return <SC.ResourcesLinkWrapper to={to}>{children}</SC.ResourcesLinkWrapper>
|
||||
if (!to.match(/^(https?:\/\/)/)) {
|
||||
return (
|
||||
<SC.ResourcesLinkInternal to={to}>{children}</SC.ResourcesLinkInternal>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<SC.ResourcesLinkExternal href={to} target="_blank">
|
||||
{children}
|
||||
</SC.ResourcesLinkExternal>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user