Merge branch 'dev' into feat/autoplay

This commit is contained in:
Jorrin 2024-04-12 19:06:40 +02:00 committed by GitHub
commit 391554538a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,23 +1,21 @@
import { useTranslation } from "react-i18next";
import { useNavigate } from "react-router-dom";
import { Link } from "react-router-dom";
import { Icon, Icons } from "@/components/Icon";
export function BackLink(props: { url: string }) {
const { t } = useTranslation();
const navigate = useNavigate();
return (
<div className="flex items-center">
<button
type="button"
onClick={() => navigate(props.url)}
<Link
to={props.url}
className="py-1 -my-1 px-2 -mx-2 tabbable rounded-lg flex items-center cursor-pointer text-type-secondary hover:text-white transition-colors duration-200 font-medium"
>
<Icon className="mr-2" icon={Icons.ARROW_LEFT} />
<span className="md:hidden">{t("player.back.short")}</span>
<span className="hidden md:block">{t("player.back.default")}</span>
</button>
</Link>
</div>
);
}