bug: add locale to webview links
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import JsonToHtml from "@/components/JsonToHtml"
|
||||
import Overview from "@/components/MyPages/Blocks/Overview"
|
||||
import Shortcuts from "@/components/MyPages/Blocks/Shortcuts"
|
||||
import { removeMultipleSlashes } from "@/utils/url"
|
||||
import { modWebviewLink } from "@/utils/webviews"
|
||||
|
||||
import CurrentBenefitsBlock from "../../Blocks/Benefits/CurrentLevel"
|
||||
@@ -57,9 +58,11 @@ export default function Content({ lang, content }: ContentProps) {
|
||||
item.dynamic_content.link.linkConnection.edges[0].node
|
||||
.original_url ||
|
||||
modWebviewLink(
|
||||
removeMultipleSlashes(
|
||||
`/${item.dynamic_content.link.linkConnection.edges[0].node.system.locale}/${item.dynamic_content.link.linkConnection.edges[0].node.url}`
|
||||
),
|
||||
item.dynamic_content.link.linkConnection.edges[0].node
|
||||
.url,
|
||||
lang
|
||||
.system.locale
|
||||
),
|
||||
text: item.dynamic_content.link.link_text,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user