Skip to content

Commit

Permalink
Update proposal link to use a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
hyifeng committed Nov 18, 2024
1 parent f18571e commit d926c45
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions next/components/hardLink.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
import styled from "styled-components";

const Wrapper = styled.div`
cursor: pointer;
`;

const navigate = (href) => window.location.assign(href);

export default function HardLink({ href, children }) {
return href ? (
<Wrapper onClick={() => navigate(href)}>{children}</Wrapper>
) : (
<>{children}</>
);
return href ? <a href={href}>{children}</a> : <>{children}</>;
}

0 comments on commit d926c45

Please sign in to comment.