Skip to content

Commit

Permalink
Fix urls on popup
Browse files Browse the repository at this point in the history
  • Loading branch information
Baghdasaryan committed Feb 20, 2024
1 parent 4b0d208 commit 78e152b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,11 @@ type Props = {
url?: string;
text?: string;
};
const BackButton: FC<Props> = ({ trackName, url, text }) => {
const BackButton: FC<Props> = ({ url, text }) => {
const navigate = useNavigate();

return (
<Button
variant="outline"
trackName={`Back ${trackName}`}
onClick={() => navigate((url || -1) as string)}
startIcon={<Icon name="arrowLeft" />}
>
<Button variant="outline" onClick={() => navigate((url || -1) as string)} startIcon={<Icon name="arrowLeft" />}>
{text || "Back"}
</Button>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const CreateRules: FC = (): ReactElement => {
const { hostname } = new URL(tab[0].url as string);
const hostnameArr = hostname.split(".");
const name = hostnameArr[hostnameArr.length - 2];
const url: string = `options/options.html#/create/${path}?source=${hostname}&name=${capitalizeFirstLetter(name)}`;
// const url: string = `options/options.html#/create/${path}?source=${hostname}&name=${capitalizeFirstLetter(name)}`;
const url: string = `options/options.html#/create/${path}`;
chrome.tabs.create({ url: chrome.runtime.getURL(url) });
});
};
Expand Down

0 comments on commit 78e152b

Please sign in to comment.