Skip to content

Commit 2a6de4f

Browse files
authored
Merge pull request #102 from navikt/russisk-ukrainsk
fikse russisk og ukrainsk innhold
2 parents b7eb4c9 + 2ac1dec commit 2a6de4f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

xp-archive/client/contentView/htmlView/HtmlView.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ type Props = {
1010
versionId: string;
1111
};
1212

13-
export const HtmlView = ({ nodeId, locale, versionId }: Props) => {
13+
const localesToOverwrite = ['uk', 'ru'];
14+
15+
export const HtmlView = ({ nodeId, locale: langLocale, versionId }: Props) => {
1416
const [isLoading, setIsLoading] = useState(true);
17+
const locale = localesToOverwrite.includes(langLocale) ? 'no' : langLocale;
1518
const htmlPath = `${xpArchiveConfig.basePath}/html/${nodeId}/${locale}/${versionId}`;
1619

1720
return (

xp-archive/client/viewSelector/ViewSelector.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ export const ViewSelector = ({
3838
};
3939

4040
const relevantViewVariants = getRelevantViewVariants(isWebpage, hasAttachment);
41+
if (!relevantViewVariants.length || !selectedView) {
42+
return null;
43+
}
4144

4245
if (relevantViewVariants.length === 0) {
4346
return null;

0 commit comments

Comments
 (0)