Skip to content

Commit

Permalink
remove replace fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Megha-Dev-19 committed Jan 4, 2024
1 parent 0baae76 commit 77ec7ac
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/devhub/page/addon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,6 @@ const ButtonRow = styled.div`

const [view, setView] = useState(props.view || "viewer");

// TODO : remove after contract data change
function updateWidgetEndpoint(widgetSrc) {
widgetSrc = widgetSrc.replace("configurator", "Configurator");
return widgetSrc.replace("devgovgigs.near", "devhub.near");
}

return (
<Container>
{permissions.can_configure && (
Expand All @@ -112,7 +106,7 @@ return (
<Content>
{view === "configure" ? (
<Widget
src={updateWidgetEndpoint(addonMatch.configurator_widget)}
src={addonMatch.configurator_widget}
props={{
...config,
data: config,
Expand All @@ -131,7 +125,7 @@ return (
/>
) : (
<Widget
src={updateWidgetEndpoint(addonMatch.view_widget)}
src={addonMatch.view_widget}
props={{
...config,
data: config,
Expand Down

0 comments on commit 77ec7ac

Please sign in to comment.