Skip to content

Commit c2439e1

Browse files
authored
Merge pull request #53 from cecilia-sanare/anchor-tags
fix: issue with middle clicking and ctrl clicking themes / plugins
2 parents fa140ee + 53452a6 commit c2439e1

3 files changed

Lines changed: 4 additions & 12 deletions

File tree

apps/www/src/components/PluginCard.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ function CreateCard(item) {
1919
}
2020
}
2121

22-
const openPopup = () => {
23-
window.location.href = `/plugin?id=${data.id}`;
24-
};
25-
2622
const openInNewTab = (e) => {
2723
window.open(`/plugin?id=${data.id}`, '_blank');
2824
setContextMenu({ ...contextMenu, visible: false });
@@ -99,7 +95,7 @@ function CreateCard(item) {
9995

10096
return (
10197
<>
102-
<a className="card-wrap" onClick={openPopup} onContextMenu={handleContextMenu} ref={cardRef} tabIndex={0} style={{ position: 'relative', userSelect: 'none' }}>
98+
<a className="card-wrap" href={`/plugin?id=${data.id}`} onContextMenu={handleContextMenu} ref={cardRef} tabIndex={0} style={{ position: 'relative', userSelect: 'none' }}>
10399
<div className="card">
104100
<div className="card-body">
105101
<h3 className="card-title">{data?.pluginJson?.common_name}</h3>

apps/www/src/components/RenderFluenty.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ function DisplayFluentyAd() {
6060

6161
return (
6262
<>
63-
<a className="card-wrap" ref={cardRef} tabIndex={0} style={{ position: 'relative', userSelect: 'none' }}>
64-
<div className="card" onClick={() => (window.location.href = '/fluenty-steam')} onContextMenu={handleContextMenu} style={{ width: '100%', height: '100%' }}>
63+
<a className="card-wrap" href="/fluenty-steam" ref={cardRef} tabIndex={0} style={{ position: 'relative', userSelect: 'none' }}>
64+
<div className="card" onContextMenu={handleContextMenu} style={{ width: '100%', height: '100%' }}>
6565
<img loading="lazy" className="card-image" src="https://i.imgur.com/2aAaAES.gif" data-holder-rendered="true" />
6666
<div className="card-body">
6767
<h3 className="card-title">Fluenty</h3>

apps/www/src/components/ThemeCard.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ function CreateCard(item) {
1919
}
2020
}
2121

22-
const openPopup = () => {
23-
window.location.href = `/theme?id=${data.data.id}`;
24-
};
25-
2622
const openInNewTab = (e) => {
2723
window.open(`/theme?id=${data.data.id}`, '_blank');
2824
setContextMenu({ ...contextMenu, visible: false });
@@ -75,7 +71,7 @@ function CreateCard(item) {
7571

7672
return (
7773
<>
78-
<a className="card-wrap" onClick={openPopup} onContextMenu={handleContextMenu} ref={cardRef} tabIndex={0} style={{ position: 'relative', userSelect: 'none' }}>
74+
<a className="card-wrap" href={`/theme?id=${data.data.id}`} onContextMenu={handleContextMenu} ref={cardRef} tabIndex={0} style={{ position: 'relative', userSelect: 'none' }}>
7975
<div className="card" style={{ width: '100%', height: '100%' }}>
8076
<img
8177
loading="lazy"

0 commit comments

Comments
 (0)