add toggle to not show version on logo

This commit is contained in:
Mary Hipp
2023-07-18 16:16:35 -04:00
parent b4eeaaa63c
commit 4b678f2416

View File

@ -5,7 +5,11 @@ import { useRef } from 'react';
import { useHoverDirty } from 'react-use'; import { useHoverDirty } from 'react-use';
import { useGetAppVersionQuery } from 'services/api/endpoints/appInfo'; import { useGetAppVersionQuery } from 'services/api/endpoints/appInfo';
const InvokeAILogoComponent = () => { interface Props {
showVersion?: boolean;
}
const InvokeAILogoComponent = ({ showVersion = true }: Props) => {
const { data: appVersion } = useGetAppVersionQuery(); const { data: appVersion } = useGetAppVersionQuery();
const ref = useRef(null); const ref = useRef(null);
const isHovered = useHoverDirty(ref); const isHovered = useHoverDirty(ref);
@ -28,7 +32,7 @@ const InvokeAILogoComponent = () => {
invoke <strong>ai</strong> invoke <strong>ai</strong>
</Text> </Text>
<AnimatePresence> <AnimatePresence>
{isHovered && appVersion && ( {showVersion && isHovered && appVersion && (
<motion.div <motion.div
key="statusText" key="statusText"
initial={{ initial={{