refactor: polish the tailwind refactor

This commit is contained in:
Tristan Yang
2023-02-09 17:50:42 +08:00
parent 0b817773a0
commit 446e9a17d9
38 changed files with 80 additions and 70 deletions
+3 -1
View File
@@ -1,3 +1,4 @@
import dayjs from "dayjs";
import { FC } from "react";
import { useTranslation } from "react-i18next";
import { useGetServerVersionQuery } from "../../app/services/server";
@@ -5,11 +6,12 @@ type Props = {};
const Version: FC<Props> = () => {
const { t } = useTranslation("setting", { keyPrefix: "version" });
const { data: serverVersion } = useGetServerVersionQuery();
const ts = process.env.REACT_APP_BUILD_TIME;
return (
<div className="flex flex-col gap-3 dark:text-white">
<div className="item">{t("client_version")}: {process.env.VERSION}</div>
<div className="item">{t("server_version")}: {serverVersion}</div>
<div className="item">{t("build_time")}: {process.env.REACT_APP_BUILD_TIME}</div>
<div className="item">{t("build_time")}: {ts} {dayjs(ts).fromNow()}</div>
</div>
);
};