refactor: polish the tailwind refactor
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user