0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

fix(ui-theme): show default logo in footer (#3031)

* fix(ui-theme): show default logo in footer

The link of the footer logo is verdaccio website, so the logo should be verdaccio's

* fixup! fix(ui-theme): show default logo in footer

* fixup! fixup! fix(ui-theme): show default logo in footer
This commit is contained in:
Xingwang Liao 2022-03-07 15:53:48 +08:00 committed by GitHub
parent a049eaa38f
commit a179f1fd43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View file

@ -0,0 +1,5 @@
---
'@verdaccio/ui-theme': patch
---
show verdaccio logo in the footer even when custom brand is set

View file

@ -56,7 +56,7 @@ const Footer = () => {
{configOptions?.version && (
<>
{t('footer.powered-by')}
<Logo onClick={goToVerdaccioWebsite} size="x-small" />
<Logo isDefault={true} onClick={goToVerdaccioWebsite} size="x-small" />
{`/ ${configOptions.version}`}
</>
)}

View file

@ -21,11 +21,12 @@ interface Props {
size?: keyof typeof sizes;
onClick?: () => void;
className?: string;
isDefault?: boolean;
}
const Logo: React.FC<Props> = ({ size, onClick, className }) => {
const Logo: React.FC<Props> = ({ size, onClick, className, isDefault = false }) => {
const { configOptions } = useConfig();
if (configOptions?.logo) {
if (!isDefault && configOptions?.logo) {
return (
<ImageLogo onClick={onClick} className={className}>
<img alt="logo" height="40px" src={configOptions.logo} />