You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mvfront-react/components/Logo.tsx

35 lines
692 B

import PropTypes from 'prop-types';
import Image from 'next/image'
import logoWithText from '../public/logos/logo.svg'
import logo from '../public/logos/logo-footer.svg'
import {useTranslation} from "next-i18next";
export const getStaticProps = async ({locale}) => ({
props: {
...(await serverSideTranslations(locale, [], config)),
},
});
const Logo = ({title, ...props}) => {
const {t} = useTranslation();
const src = title ? logoWithText : logo;
return (
<Image
src={src}
alt={t('logo.alt')}
className="d-block"
{...props}
/>
)
};
Logo.propTypes = {
title: PropTypes.bool
};
Logo.defaultProps = {
title: true
};
export default Logo;