Skip to content

Commit

Permalink
Address comments, use anchor tag and noopener, norefferer
Browse files Browse the repository at this point in the history
  • Loading branch information
Duc Tai Ly committed Dec 30, 2024
1 parent ec52216 commit 7ab4925
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions library/src/components/supportedExtensions/XExtension.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,20 @@ import { ExtensionComponentProps } from '../../types';
export default function XExtension({
propertyValue,
}: ExtensionComponentProps<string>) {
const onClickHandler = () => {
window.open(`https://x.com/${propertyValue}`, '_blank');
};
// const onClickHandler = () => {
// window.open(`https://x.com/${propertyValue}`, '_blank');
// };

return (
<div
<a
title={`https://x.com/${propertyValue}`}
style={{ display: 'inline-block' }}
href={`https://x.com/${propertyValue}`}
rel="noopener noreferrer"
target="_blank"
>
<svg
onClick={onClickHandler}
// onClick={onClickHandler}
style={{ cursor: 'pointer' }}
width="15px"
height="15px"
Expand All @@ -31,6 +34,6 @@ export default function XExtension({
fill="black"
/>
</svg>
</div>
</a>
);
}

0 comments on commit 7ab4925

Please sign in to comment.