Skip to content

Commit 57b3220

Browse files
committed
Refactor HtmlView component to rename fullscreenPath to htmlPath for clarity and consistency in iframe source and button link handling.
1 parent 09a9c81 commit 57b3220

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ type Props = {
1010
};
1111

1212
export const HtmlView = ({ versionId, locale }: Props) => {
13-
const fullscreenPath = `${xpArchiveConfig.basePath}/html/${versionId}/${locale || ''}`;
13+
const htmlPath = `${xpArchiveConfig.basePath}/html/${versionId}/${locale || ''}`;
1414

1515
return (
1616
<div className={style.wrapper}>
17-
<iframe title={'HTML-visning'} src={fullscreenPath} className={style.iframe} />
17+
<iframe title={'HTML-visning'} src={htmlPath} className={style.iframe} />
1818
<Button
1919
as={'a'}
20-
href={fullscreenPath}
20+
href={htmlPath}
2121
className={style.fullscreenButton}
2222
icon={<ExpandIcon />}
2323
onClick={(e) => {
2424
e.preventDefault();
25-
window.open(fullscreenPath, '_blank');
25+
window.open(htmlPath, '_blank');
2626
}}
2727
>
2828
{'Åpne i nytt vindu'}

0 commit comments

Comments
 (0)