41 lines
2.0 KiB
TypeScript
41 lines
2.0 KiB
TypeScript
/* -------------------------------------------------------------------------- */
|
|
/* Libraries */
|
|
/* -------------------------------------------------------------------------- */
|
|
import React from "react";
|
|
import { useNavigate } from "react-router-dom";
|
|
import { Transition } from "@headlessui/react";
|
|
/* -------------------------------------------------------------------------- */
|
|
/* Hooks */
|
|
/* -------------------------------------------------------------------------- */
|
|
import { useTranslation } from "react-i18next";
|
|
/* -------------------------------------------------------------------------- */
|
|
/* Components */
|
|
/* -------------------------------------------------------------------------- */
|
|
/* -------------------------------------------------------------------------- */
|
|
/* Icons */
|
|
/* -------------------------------------------------------------------------- */
|
|
/* -------------------------------------------------------------------------- */
|
|
/* Component */
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
export default function GlobalControls() {
|
|
/* ------------------------ // Navigation hook usage ------------------------ */
|
|
const navigate = useNavigate();
|
|
const {t} = useTranslation();
|
|
/* -------------------------------- Component ------------------------------- */
|
|
return (
|
|
<>
|
|
<Transition
|
|
show={window.history.state?.idx !== 0}
|
|
enter="transition-opacity duration-75"
|
|
enterFrom="opacity-0"
|
|
enterTo="opacity-100"
|
|
leave="transition-opacity duration-100"
|
|
leaveFrom="opacity-100"
|
|
leaveTo="opacity-0"
|
|
>
|
|
</Transition>
|
|
</>
|
|
);
|
|
}
|