Skip to content

Commit

Permalink
🐛 Fix update link not working
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-drprasad committed Apr 2, 2021
1 parent f41da69 commit 0c2def0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion frontend/package.json.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
91d42f500b55f4558761a99b0a09d77d
c1b735b5b871dd4d5c38fc7026d7b1b2
9 changes: 4 additions & 5 deletions frontend/src/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ function Footer({ onLangChange }) {
const { t } = useTranslation("translation");
const [version, setVersion] = useState({ current: undefined, latest: undefined, hasUpdate: false });

const handleUpdateClick = (e) => {
e.preventDefault();
const handleUpdateClick = () => {
window.backend.Runtime.OpenURL("https://github.com/dev-drprasad/hsk00/releases/latest");
};

Expand All @@ -30,9 +29,9 @@ function Footer({ onLangChange }) {
<span className="version">
{version.current}{" "}
{version.hasUpdate && (
<a onClick={handleUpdateClick} href="https://github.com/dev-drprasad/hsk00/releases/latest">
({"🎉"} {t("update available")} : {version.latest})
</a>
<span className="update-link" onClick={handleUpdateClick}>
({t("update available")} : {version.latest})
</span>
)}
</span>
<span onClick={handleGHClick} className="github-link">
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/Footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
width: 20%;
color: #cccccc;
position: absolute;
z-index: 1;
}

.version {
Expand All @@ -15,10 +16,10 @@
text-align: center;
line-height: 1.3rem;
font-size: 0.85em;
z-index: -1;

> a {
color: inherit;
.update-link {
text-decoration: underline;
cursor: pointer;
}
}

Expand All @@ -28,4 +29,5 @@
right: 1rem;
font-size: 1.2rem;
color: #cccccc;
cursor: pointer;
}

0 comments on commit 0c2def0

Please sign in to comment.