Files
.github
.vscode
docker
internal
migrations
ui
public
src
api
components
access
certificate
notification
provider
workflow
DrawerForm.tsx
ModalForm.tsx
MultipleInput.tsx
Show.tsx
Version.tsx
domain
hooks
i18n
pages
repository
stores
utils
App.tsx
declarations.d.ts
global.css
index.css
main.tsx
router.tsx
vite-env.d.ts
types
.eslintrc.cjs
.gitignore
.prettierrc.cjs
components.json
embed.go
index.html
package-lock.json
package.json
postcss.config.js
tailwind.config.js
tsconfig.app.json
tsconfig.json
tsconfig.node.json
vite.config.ts
.dockerignore
.editorconfig
.gitignore
.goreleaser.yml
CHANGELOG.md
CONTRIBUTING.md
CONTRIBUTING_EN.md
Dockerfile
LICENSE.md
Makefile
README.md
README_EN.md
go.mod
go.sum
main.go
nixpacks.toml
usage.gif
certimate/ui/src/components/Version.tsx
2025-01-03 20:29:34 +08:00

32 lines
978 B
TypeScript

import { useTranslation } from "react-i18next";
import { ReadOutlined as ReadOutlinedIcon } from "@ant-design/icons";
import { Divider, Space, Typography } from "antd";
import { version } from "@/domain/version";
export type VersionProps = {
className?: string;
style?: React.CSSProperties;
};
const Version = ({ className, style }: VersionProps) => {
const { t } = useTranslation();
return (
<Space className={className} style={style} size={4}>
<Typography.Link type="secondary" href="https://docs.certimate.me" target="_blank">
<div className="flex items-center justify-center space-x-1">
<ReadOutlinedIcon />
<span>{t("common.menu.document")}</span>
</div>
</Typography.Link>
<Divider type="vertical" />
<Typography.Link type="secondary" href="https://github.com/usual2970/certimate/releases" target="_blank">
{version}
</Typography.Link>
</Space>
);
};
export default Version;