mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-06 22:40:26 -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:
parent
a049eaa38f
commit
a179f1fd43
3 changed files with 9 additions and 3 deletions
5
.changeset/dull-monkeys-search.md
Normal file
5
.changeset/dull-monkeys-search.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@verdaccio/ui-theme': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
show verdaccio logo in the footer even when custom brand is set
|
|
@ -56,7 +56,7 @@ const Footer = () => {
|
||||||
{configOptions?.version && (
|
{configOptions?.version && (
|
||||||
<>
|
<>
|
||||||
{t('footer.powered-by')}
|
{t('footer.powered-by')}
|
||||||
<Logo onClick={goToVerdaccioWebsite} size="x-small" />
|
<Logo isDefault={true} onClick={goToVerdaccioWebsite} size="x-small" />
|
||||||
{`/ ${configOptions.version}`}
|
{`/ ${configOptions.version}`}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -21,11 +21,12 @@ interface Props {
|
||||||
size?: keyof typeof sizes;
|
size?: keyof typeof sizes;
|
||||||
onClick?: () => void;
|
onClick?: () => void;
|
||||||
className?: string;
|
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();
|
const { configOptions } = useConfig();
|
||||||
if (configOptions?.logo) {
|
if (!isDefault && configOptions?.logo) {
|
||||||
return (
|
return (
|
||||||
<ImageLogo onClick={onClick} className={className}>
|
<ImageLogo onClick={onClick} className={className}>
|
||||||
<img alt="logo" height="40px" src={configOptions.logo} />
|
<img alt="logo" height="40px" src={configOptions.logo} />
|
||||||
|
|
Loading…
Reference in a new issue