Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 215x 247x 247x 247x | import React from "react";
import { useTranslation } from "react-i18next";
import { AppVersionContext } from "~app/contexts/app-version-context";
import { Text } from "~components/text";
import { View } from "~components/view";
export const AppVersion: React.FC<
React.ComponentProps<typeof View> & {
textProps?: React.ComponentProps<typeof Text>;
}
> = ({ textProps, ...props }) => {
const { t } = useTranslation();
const version = React.use(AppVersionContext);
return (
<View {...props}>
<Text {...textProps}>{t("components.version.current", { version })}</Text>
</View>
);
};
|