Skip to content

Commit

Permalink
fix: add firefox "rate" button
Browse files Browse the repository at this point in the history
  • Loading branch information
husa committed Feb 5, 2025
1 parent 9aa459f commit 84f9023
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/components/Settings/SettingsPanelAbout/SettingsPanelAbout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ import { SettingsPanel } from '../SettingsPanel/SettingsPanel';
import lang from '../../../services/lang';
import { currentRuntime } from '../../../utils/currentRuntime';

// TODO: add link to Mozilla Add-ons
export const SettingsPanelAbout = () => {
const manifest = chrome.runtime.getManifest();
const extentionId = chrome.runtime.id;
const storeUrl =
currentRuntime === 'chrome'
? `https://chrome.google.com/webstore/detail/${extentionId}`
: `https://addons.mozilla.org/firefox/addon/${extentionId}`;

return (
<SettingsPanel className="settings-panel-about">
<h1>{manifest.name}</h1>
<h3>{manifest.version}</h3>
{currentRuntime === 'chrome' && (
<a
href={`https://chrome.google.com/webstore/detail/${chrome.runtime.id}`}
className="settings-about__like">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlinkHref="#favorite"></use>
</svg>
<span>{lang.t('i18nRate')}</span>
</a>
)}
<a href={storeUrl} className="settings-about__like">
<svg viewBox="0 0 24 24" width="24" height="24">
<use xlinkHref="#favorite"></use>
</svg>
<span>{lang.t('i18nRate')}</span>
</a>
</SettingsPanel>
);
};

0 comments on commit 84f9023

Please sign in to comment.