Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit 2e98787

Browse files
Fix services logo (#81)
1 parent 8f7853c commit 2e98787

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@cloudquery/plugin-config-ui-lib",
33
"description": "Plugin configuration UI library for CloudQuery Cloud App",
4-
"version": "6.0.1",
4+
"version": "6.0.2",
55
"private": false,
66
"main": "dist/index.cjs.js",
77
"module": "dist/index.esm.js",

src/components/display/logo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function Logo({ width = 24, height = 24, src, alt, fallbackSrc }: LogoPro
6161
height={height - PADDING}
6262
width={width - PADDING}
6363
onLoad={() => setIsLoaded(true)}
64-
onError={parseSrc(currentSrc) === src ? handleError : undefined}
64+
onError={handleError}
6565
/>
6666
</Box>
6767
);

src/components/display/serviceList.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import Tooltip from '@mui/material/Tooltip';
1313
import Typography from '@mui/material/Typography';
1414

1515
import { Logo } from './logo';
16+
import { parseSrc } from '../../utils/parseSrc';
1617

1718
enum ServiceListMode {
1819
All = 'all',
@@ -56,7 +57,7 @@ export interface ServiceListProps {
5657
export function ServiceList({
5758
services,
5859
topServices = [],
59-
fallbackLogoSrc = 'favicon.ico',
60+
fallbackLogoSrc = parseSrc('favicon.ico'),
6061
value = [],
6162
onChange,
6263
maxHeight = '400px',

src/components/form/controls/controlServicesSelectorField.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import FormLabel from '@mui/material/FormLabel';
66

77
import { Controller } from 'react-hook-form';
88

9+
import { usePluginContext } from '../../../context';
910
import { getFieldHelperText } from '../../../utils';
1011
import { ServiceList, ServiceTypes } from '../../display';
1112

@@ -33,6 +34,8 @@ export function ControlServicesSelectorField({
3334
helperText,
3435
label,
3536
}: ControlServicesSelectorFieldProps) {
37+
const { config } = usePluginContext();
38+
3639
return (
3740
<Controller
3841
name={name}
@@ -45,6 +48,7 @@ export function ControlServicesSelectorField({
4548
value={field.value}
4649
onChange={field.onChange}
4750
maxHeight="none"
51+
fallbackLogoSrc={config.iconLink}
4852
/>
4953
<FormHelperText error={!!fieldState.error?.message}>
5054
{getFieldHelperText(fieldState.error?.message, helperText)}

src/components/form/header.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useFormContext } from 'react-hook-form';
55
import { ControlTextField } from './controls/controlTextField';
66
import { Section } from './sections/section';
77
import { usePluginContext } from '../../context/plugin';
8+
import { parseSrc } from '../../utils/parseSrc';
89
import { Logo } from '../display';
910

1011
/**
@@ -37,7 +38,7 @@ export function ConfigUIFormHeader() {
3738
gap: 1.5,
3839
}}
3940
>
40-
<Logo src={config.iconLink} fallbackSrc="favicon.ico" alt={config.label} />
41+
<Logo src={config.iconLink} fallbackSrc={parseSrc('favicon.ico')} alt={config.label} />
4142
<Typography variant="body1">{config.label}</Typography>
4243
</Box>
4344
</Box>

0 commit comments

Comments
 (0)