1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-12-19 19:05:56 +01:00
upscayl/renderer/components/Header.tsx
NayamAmarshe 95843ded88
Refactor Renderer Code (#987)
* Initial refactor

* Remove unused imports

* Update code

* Refactor and Update Code

- Change file names to kebab-caase
- Add new useTranslation Hook
- Change useLog hook name to useLogger
- Update translation hook to provide autocomplete

* Update import and component name

* Rename files and components

* Update locales

* Update electron commands

* Update var

* Change Lowercase

* Replace filter with map

* Add props

* Update flag check

* Add validate paths

* Update formats

* Update import

* Update function

* Update function and translation

* Update handlePaste
2024-10-04 14:45:54 +05:30

33 lines
1.1 KiB
TypeScript

import { FEATURE_FLAGS } from "@common/feature-flags";
import React from "react";
import UpscaylSVGLogo from "@/components/icons/upscayl-logo-svg";
import { useAtomValue } from "jotai";
import { translationAtom } from "@/atoms/translations-atom";
export default function Header({ version }: { version: string }) {
const t = useAtomValue(translationAtom);
return (
<a
href="https://github.com/upscayl/upscayl"
target="_blank"
className={`outline-none focus-visible:ring-2`}
data-tooltip-id="tooltip"
data-tooltip-content={t("HEADER.GITHUB_BUTTON_TITLE")}
>
<div className="flex items-center gap-3 px-5 py-5">
<UpscaylSVGLogo className="inline-block h-14 w-14" />
<div className="flex flex-col justify-center">
<h1 className="text-3xl font-bold">
{t("TITLE")}{" "}
<span className="text-xs">
{version} {FEATURE_FLAGS.APP_STORE_BUILD && "Mac"}
</span>
</h1>
<p className="">{t("HEADER.DESCRIPTION")}</p>
</div>
</div>
</a>
);
}