diff --git a/src/components/Dashboard/Management/About.jsx b/src/components/Dashboard/Management/About.jsx index fe1d8d6..b460d92 100644 --- a/src/components/Dashboard/Management/About.jsx +++ b/src/components/Dashboard/Management/About.jsx @@ -20,6 +20,7 @@ import { AuthContext } from '../context/AuthContext' import { ElectronContext } from '../context/ElectronContext' import { AppUpdateContext } from '../context/AppUpdateContext' import { useMediaQuery } from 'react-responsive' +import FarmControlAppIcon from '../../Logos/FarmControlAppIcon' const { Title, Text, Link } = Typography const About = () => { @@ -125,9 +126,7 @@ const About = () => { collapseKey='purchaseOrderStats' > - Farm Control Logo diff --git a/src/components/Dashboard/Management/AppUpdates/NewAppUpdate.jsx b/src/components/Dashboard/Management/AppUpdates/NewAppUpdate.jsx index 9548d88..d5711d3 100644 --- a/src/components/Dashboard/Management/AppUpdates/NewAppUpdate.jsx +++ b/src/components/Dashboard/Management/AppUpdates/NewAppUpdate.jsx @@ -1,6 +1,7 @@ import PropTypes from 'prop-types' import { Button, Flex, Typography, Card } from 'antd' import TimeDisplay from '../../common/TimeDisplay' +import FarmControlAppIcon from '../../../Logos/FarmControlAppIcon' const { Text, Title } = Typography @@ -15,11 +16,7 @@ const NewAppUpdate = ({ update, onCancel, onUpdate }) => { - Farm Control Logo + {'Farm Control UI'} diff --git a/src/components/Logos/FarmControlAppIcon.jsx b/src/components/Logos/FarmControlAppIcon.jsx new file mode 100644 index 0000000..0688a8d --- /dev/null +++ b/src/components/Logos/FarmControlAppIcon.jsx @@ -0,0 +1,22 @@ +import PropTypes from 'prop-types' + +const FarmControlAppIcon = ({ alt = 'Farm Control Logo', style, ...props }) => { + const useRelativePath = + typeof window !== 'undefined' && window.location.href.includes('index.html') + + return ( + <img + src={`${useRelativePath ? '.' : ''}/logo512.png`} + alt={alt} + style={style} + {...props} + /> + ) +} + +FarmControlAppIcon.propTypes = { + alt: PropTypes.string, + style: PropTypes.object +} + +export default FarmControlAppIcon