🐛 Fix crash and missing translations with icon picker

This commit is contained in:
Manuel
2023-01-29 14:21:35 +01:00
parent dabb7c2409
commit 67ee1bfb9d
4 changed files with 10 additions and 3 deletions

View File

@@ -0,0 +1,7 @@
{
"iconPicker": {
"textInputPlaceholder": "Search something...",
"searchLimitationTitle": "Limited to 30 results",
"searchLimitationMessage": "Search results were limited to 30 because there were too many matches"
}
}

View File

@@ -33,7 +33,7 @@ export const AppearanceTab = ({
label={t('appearance.icon.label')}
description={t('appearance.icon.description')}
variant="default"
data={data.files ?? []}
data={data?.files ?? []}
withAsterisk
required
{...form.getInputProps('appearance.iconUrl')}

View File

@@ -31,7 +31,7 @@ interface IconSelectorProps {
}
export const IconSelector = ({ onChange, allowAppNamePropagation, form }: IconSelectorProps) => {
const { t } = useTranslation('layout/tools');
const { t } = useTranslation('layout/modals/icon-picker');
const { data, isLoading } = useRepositoryIconsQuery<WalkxcodeRepositoryIcon>({
url: 'https://api.github.com/repos/walkxcode/Dashboard-Icons/contents/png',

View File

@@ -1,9 +1,9 @@
export const dashboardNamespaces = [
'common',
'layout/tools',
'layout/element-selector/selector',
'layout/modals/add-app',
'layout/modals/change-position',
'layout/modals/icon-picker',
'layout/modals/about',
'layout/header/actions/toggle-edit-mode',
'layout/mobile/drawer',