2023-10-02 21:04:40 +02:00
|
|
|
import { useTranslation } from "react-i18next";
|
2023-10-12 23:05:47 +02:00
|
|
|
import { useHistory } from "react-router-dom";
|
2023-10-02 21:04:40 +02:00
|
|
|
|
|
|
|
import { Icon, Icons } from "@/components/Icon";
|
|
|
|
|
2023-10-12 23:05:47 +02:00
|
|
|
export function BackLink(props: { url: string }) {
|
2023-10-02 21:04:40 +02:00
|
|
|
const { t } = useTranslation();
|
2023-10-12 23:05:47 +02:00
|
|
|
const history = useHistory();
|
2023-10-02 21:04:40 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="flex items-center">
|
|
|
|
<span
|
2023-10-12 23:05:47 +02:00
|
|
|
onClick={() => history.push(props.url)}
|
2023-10-02 21:04:40 +02:00
|
|
|
className="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} />
|
2023-10-08 19:35:11 +02:00
|
|
|
<span className="md:hidden">{t("videoPlayer.backToHomeShort")}</span>
|
|
|
|
<span className="hidden md:block">{t("videoPlayer.backToHome")}</span>
|
2023-10-02 21:04:40 +02:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|