Skip to content

Commit

Permalink
Merge pull request #783 from AppQuality/develop
Browse files Browse the repository at this point in the history
Notifications EN
  • Loading branch information
iDome89 authored Mar 25, 2024
2 parents 86aa4cd + d3c7f03 commit b726edd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ REACT_APP_TRYBER_URL=https://app.tryber.me
REACT_ZAPIER_WEBHOOK=https://hooks.zapier.com/hooks/catch/5196925/bkxm1k6/
REACT_APP_STRAPI_URL=https://admin.unguess.io
REACT_APP_STRAPI_API_URL=https://admin.unguess.io/api
REACT_APP_CROWD_WP_URL=
REACT_APP_CROWD_WP_URL=
1 change: 0 additions & 1 deletion src/common/components/inviteUsers/campaignSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export const CampaignSettings = () => {
body: {
email: values.email,
redirect_url: campaignRoute,
locale: i18n.language,
...(values.message && { message: values.message }),
},
})
Expand Down
1 change: 0 additions & 1 deletion src/common/components/inviteUsers/projectSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ export const ProjectSettings = () => {
body: {
email: values.email,
redirect_url: projectRoute,
locale: i18n.language,
...(values.message && { message: values.message }),
},
})
Expand Down
2 changes: 0 additions & 2 deletions src/common/components/inviteUsers/workspaceSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
usePostWorkspacesByWidUsersMutation,
} from 'src/features/api';
import { useActiveWorkspace } from 'src/hooks/useActiveWorkspace';
import i18n from 'src/i18n';
import { AddNewMemberInput } from './addNewMember';
import { PermissionSettingsFooter } from './modalFooter';
import {
Expand Down Expand Up @@ -61,7 +60,6 @@ export const WorkspaceSettings = () => {
wid: activeWorkspace?.id.toString() || '',
body: {
email: values.email,
locale: i18n.language,
...(values.message && { message: values.message }),
},
})
Expand Down
14 changes: 6 additions & 8 deletions src/hooks/useLocalizeDashboardUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,18 @@ export const getLocalizedProjectUrl = (
aProjectId: number,
aLanguage: string
): string => {
const location = window.location.host;

const { host, protocol } = window.location;
return aLanguage === 'en'
? `${location}/projects/${aProjectId}`
: `${location}/it/projects/${aProjectId}`;
? `${protocol}//${host}/projects/${aProjectId}`
: `${protocol}//${host}/it/projects/${aProjectId}`;
};

export const getLocalizedCampaignUrl = (
aCampaignId: number,
aLanguage: string
): string => {
const location = window.location.host;

const { host, protocol } = window.location;
return aLanguage === 'en'
? `${location}/campaigns/${aCampaignId}`
: `${location}/it/campaigns/${aCampaignId}`;
? `${protocol}//${host}/campaigns/${aCampaignId}`
: `${protocol}//${host}/it/campaigns/${aCampaignId}`;
};

0 comments on commit b726edd

Please sign in to comment.