Skip to content

Commit b137b99

Browse files
fix error page props and build errors
1 parent 78de796 commit b137b99

File tree

5 files changed

+8
-15
lines changed

5 files changed

+8
-15
lines changed

src/app/global-error.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export default function GlobalError({
2222
<ErrorPageComponent
2323
languageCode={languageCode}
2424
themeCode={themeCode}
25-
dictionary={layoutDictionary}
2625
>
2726
<UnexpectedErrorComponent
2827
metadata={layoutDictionary.errors.unexpectedError}

src/app/not-found.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export default function NotFound() {
1515
<ErrorPageComponent
1616
languageCode={languageCode}
1717
themeCode={themeCode}
18-
dictionary={layoutDictionary}
1918
>
2019
<NotFoundComponent metadata={layoutDictionary.errors.notFound} />
2120
</ErrorPageComponent>

src/features/common/components/errors/error-page/error-page.component.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,41 @@ import { ShellComponent } from "@/features/common/components/shell/shell.compone
44
import { MobileHeaderComponent } from "@/features/common/components/headers/mobile-header/mobile-header.component";
55
import { HeaderComponent } from "@/features/common/components/headers/header/header.component";
66
import { FooterComponent } from "@/features/common/components/footer/footer.component";
7-
import { LayoutDictionaryModel } from "@/features/localization/models/layout-dictionary.model";
87
import { ThemeCookieValues } from "@/features/common/values/theme.values";
9-
import { getImageDictionary } from "@/features/localization/services/images-dictionary.service";
8+
import { getLayoutDictionary } from "@/features/localization/services/language-dictionary.service";
109

1110
interface ErrorPageComponentProps {
1211
languageCode: string;
1312
themeCode: ThemeCookieValues;
14-
dictionary: LayoutDictionaryModel;
1513
children: React.ReactNode;
1614
}
1715

1816
export const ErrorPageComponent: React.FC<ErrorPageComponentProps> = ({
1917
languageCode,
2018
themeCode,
21-
dictionary,
2219
children,
2320
}) => {
21+
const layoutDictionary = getLayoutDictionary(languageCode);
2422

2523
return (
2624
<html lang={languageCode} data-theme={themeCode}>
2725
<ShellComponent languageCode={languageCode} themeCode={themeCode}>
2826
<header className={styles.header}>
2927
<MobileHeaderComponent
3028
languageCode={languageCode}
31-
dictionary={dictionary.header}
29+
dictionary={layoutDictionary}
30+
themeCode={themeCode}
3231
/>
3332
<HeaderComponent
3433
languageCode={languageCode}
35-
dictionary={dictionary.header}
34+
dictionary={layoutDictionary}
35+
themeCode={themeCode}
3636
/>
3737
</header>
3838
<main className={styles.main}>{children}</main>
3939
<FooterComponent
4040
languageCode={languageCode}
41-
dictionary={dictionary.footer}
41+
dictionary={layoutDictionary.footer}
4242
/>
4343
</ShellComponent>
4444
</html>

src/features/common/components/theme-picker/theme-picker.component.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ interface ThemePickerComponentProps {
1111
handleSelection: (value: ThemePickerCodeValues) => Promise<void>;
1212
}
1313

14-
enum PicketListItemStateValues {
15-
INACTIVE = "INACTIVE",
16-
ACTIVE = "ACTIVE",
17-
}
18-
1914
export const ThemePickerComponent: React.FC<ThemePickerComponentProps> = ({
2015
options,
2116
selectedOptionCode,

src/features/common/models/static-image-metadata.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export interface StaticImageMetadataModel {
2-
src?: string;
2+
src: string;
33
alt: string;
44
width?: number;
55
height?: number;

0 commit comments

Comments
 (0)