Skip to content

Commit

Permalink
Merge pull request #121 from shayan-deriv/shayan/fix-iframe-path-issue
Browse files Browse the repository at this point in the history
Shayan/feq-2372/fix iframe path issue
  • Loading branch information
ali-hosseini-deriv authored Jun 12, 2024
2 parents 6c86d94 + 126cd34 commit ae86cd0
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
13 changes: 9 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@deriv-com/api-hooks": "^1.1.1",
"@deriv-com/translations": "^1.2.4",
"@deriv-com/ui": "^1.27.9",
"@deriv-com/utils": "latest",
"@deriv-com/utils": "^0.0.25",
"@deriv/deriv-api": "^1.0.15",
"@deriv/quill-design": "^1.2.24",
"@deriv/quill-icons": "^1.22.10",
Expand Down
File renamed without changes.
21 changes: 13 additions & 8 deletions src/components/DerivIframe/DerivIframe.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
const DerivIframe = () => (
<iframe
id='localstorage-sync'
sandbox='allow-same-origin allow-scripts'
src='../../../../localstorage-sync.html'
style={{ display: 'none', visibility: 'hidden' }}
/>
);
import { URLConstants } from '@deriv-com/utils';

const DerivIframe = () => {
const origin = URLConstants.derivP2pProduction;
return (
<iframe
id='localstorage-sync'
sandbox='allow-same-origin allow-scripts'
src={`${origin}/localstorage-sync.html`}
style={{ display: 'none', visibility: 'hidden' }}
/>
);
};

export default DerivIframe;
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default defineConfig({
},
},
plugins: [react(), svgr()],
publicDir: 'public',
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
Expand Down

0 comments on commit ae86cd0

Please sign in to comment.