Skip to content

Commit 2ac1dec

Browse files
committed
fikse russisk og ukrainsk innhold
1 parent 90136da commit 2ac1dec

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
return (
4346
<ToggleGroup

0 commit comments

Comments
 (0)