typescript-typenfehler behoben.. npm run lint läuft nun fehlerfrei durch.
This commit is contained in:
@@ -50,7 +50,10 @@ const MarkdownPreview: React.FC<{ html?: string; fallback?: string; className?:
|
||||
const Blog: React.FC<Props> = ({ posts }) => {
|
||||
const { localizedPath } = useLocalizedRoutes();
|
||||
const { props } = usePage<{ supportedLocales?: string[] }>();
|
||||
const supportedLocales = props.supportedLocales && props.supportedLocales.length > 0 ? props.supportedLocales : ['de', 'en'];
|
||||
const supportedLocales = useMemo(
|
||||
() => (props.supportedLocales && props.supportedLocales.length > 0 ? props.supportedLocales : ['de', 'en']),
|
||||
[props.supportedLocales]
|
||||
);
|
||||
const { t, i18n } = useTranslation('marketing');
|
||||
const locale = i18n.language || 'de';
|
||||
const articles = posts?.data ?? [];
|
||||
@@ -116,7 +119,7 @@ const Blog: React.FC<Props> = ({ posts }) => {
|
||||
return localizedPath(raw);
|
||||
}
|
||||
},
|
||||
[localizedPath]
|
||||
[localizedPath, supportedLocales]
|
||||
);
|
||||
|
||||
const renderPagination = () => {
|
||||
|
||||
Reference in New Issue
Block a user