Skip to content

Commit

Permalink
fix(i18n): bug form must respect page language
Browse files Browse the repository at this point in the history
  • Loading branch information
cannarocks committed Jul 20, 2023
1 parent eaae995 commit af30df6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/Bugform/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@ 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';

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"
src={`${tryberUrl}/vdp/${campaignId}/${token}`}
src={`${tryberUrl}${lang}/vdp/${campaignId}/${token}`}
style={{ width: '1px', minWidth: '100%', height: 0 }}
/>
</div>
Expand Down

0 comments on commit af30df6

Please sign in to comment.