Skip to content

Commit

Permalink
Merge pull request #670 from AppQuality/fix-bugform-public-dropdown
Browse files Browse the repository at this point in the history
Fix bugform public dropdown
  • Loading branch information
cannarocks authored Oct 11, 2023
2 parents 830afec + 917bd82 commit b9be4f8
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 21 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"i18n-iso-countries": "^7.3.0",
"i18next": "^21.6.14",
"i18next-browser-languagedetector": "^6.1.3",
"iframe-resizer-react": "^1.1.0",
"prosemirror-commands": "^1.5.0",
"prosemirror-dropcursor": "^1.6.1",
"prosemirror-gapcursor": "^1.3.1",
Expand Down
45 changes: 38 additions & 7 deletions src/pages/Bugform/index.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,55 @@
import IframeResizer from 'iframe-resizer-react';
import { useParams, useSearchParams } from 'react-router-dom';
import { Header } from 'src/common/components/navigation/header/header';
import { isDev } from 'src/common/isDevEnvironment';
import i18n from 'src/i18n';
import styled from 'styled-components';

const StyledHeader = styled(Header)`
position: fixed;
top: 0;
left: 0;
z-index: 2;
`;

const Container = styled.div`
width: 100%;
height: 100%;
max-height: 100%;
min-height: 100%;
max-width: 100%;
min-width: 100%;
position: absolute;
top: 0;
left: 0;
`;

const StyledIframe = styled.iframe`
width: 100%;
height: 100%;
max-height: 100%;
min-height: 100%;
max-width: 100%;
min-width: 100%;
border: none;
margin: 0;
`;

const BugForm = () => {
const { campaignId } = useParams<{ campaignId: string }>();
const [query] = useSearchParams();
const token = query.get('token') || '';
const tryberUrl = isDev() ? 'https://dev.tryber.me' : 'https://tryber.me';
const lang = i18n.language !== 'en' ? `/${i18n.language}` : '';

return (
<div>
<Header logo="full" loggedIn={false} />
<IframeResizer
heightCalculationMethod="lowestElement"
<Container id="container">
<StyledHeader logo="full" loggedIn={false} />
<StyledIframe
id="bug-form"
title="Bug Form"
src={`${tryberUrl}${lang}/vdp/${campaignId}/${token}`}
style={{ width: '1px', minWidth: '100%', height: 0 }}
/>
</div>
</Container>
);
};

Expand Down
13 changes: 0 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8303,19 +8303,6 @@ iferr@^0.1.5:
resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501"
integrity sha512-DUNFN5j7Tln0D+TxzloUjKB+CtVu6myn0JEFak6dG18mNt9YkQ6lzGCdafwofISZ1lLF3xRHJ98VKy9ynkcFaA==

iframe-resizer-react@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/iframe-resizer-react/-/iframe-resizer-react-1.1.0.tgz#5009e019b7a5c7f1c009bff5bcdf0dbf33557465"
integrity sha512-FrytSq91AIJaDgE+6uK/Vdd6IR8CrwLoZ6eGmL2qQMPTzF0xlSV2jaSzRRUh5V2fttD7vzl21jvBl97bV40eBw==
dependencies:
iframe-resizer "^4.3.0"
warning "^4.0.3"

iframe-resizer@^4.3.0:
version "4.3.6"
resolved "https://registry.yarnpkg.com/iframe-resizer/-/iframe-resizer-4.3.6.tgz#61d92c1adefe5d416bff4fbf80c7f1f74be70ec0"
integrity sha512-wz0WodRIF6eP0oGQa5NIP1yrITAZ59ZJvVaVJqJRjaeCtfm461vy2C3us6CKx0e7pooqpIGLpVMSTzrfAjX9Sg==

ignore@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
Expand Down

0 comments on commit b9be4f8

Please sign in to comment.