Skip to content

Commit

Permalink
feat(app-general): add contact us link
Browse files Browse the repository at this point in the history
  • Loading branch information
rams23 committed Feb 26, 2021
1 parent f9e6fcb commit 6e2c22b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/game-app/src/_shared/models/ExternalUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export enum ExternalUrl {
PIPELINE = 'https://www.eficode.com/pipeline-game',
PIPELINE_HOW_TO_PLAY = 'https://www.eficode.com/pipeline-game#how-to-play',
CHROME = 'https://www.google.com/chrome/',
CONTACT_US = 'https://www.eficode.com/pipeline-game-contact',
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const Dashboard: React.FC<Props> = () => {
const goToCreateGame = useNavigateTo(RoutingPath.CreateGame);
const goToHowToPlay = useNavigateOutsideTo(ExternalUrl.PIPELINE_HOW_TO_PLAY, true);
const goToGameInfo = useNavigateOutsideTo(ExternalUrl.PIPELINE, true);
const goToContactForm = useNavigateOutsideTo(ExternalUrl.CONTACT_US, true);

return (
<DashboardContainer>
Expand All @@ -57,7 +58,7 @@ const Dashboard: React.FC<Props> = () => {
/>
</Box>
<Box>
<Button label={t('dashboard.contactUs')} onClick={() => ({})} />
<Button label={t('dashboard.contactUs')} onClick={goToContactForm} />
</Box>
</Box>
</DashboardHeader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ import { ReactComponent as RulesIcon } from '@assets/icons/rules.svg';
import { ReactComponent as TriggerReviewIcon } from '@assets/icons/review.svg';
import { Button, IconButton, Typography, useDialog } from '@pipeline/components';
import { useHistory } from 'react-router-dom';
import { RoutingPath } from '@pipeline/routing';
import { RoutingPath, useNavigateOutsideTo } from '@pipeline/routing';
import { useTranslate } from '@pipeline/i18n';
import ShareGameDialog from '../ShareGameDialog';
import RulesOverlay from '../RulesOverlay';
import TriggerReviewDialog from '../TriggerReviewDialog';
import ConfirmExitDialog from '../ConfirmExitDialog';
import { useSelector } from 'react-redux';
import { selectors } from '../../slice';
import { ExternalUrl } from '@pipeline/models';

type Props = {};

Expand Down Expand Up @@ -53,8 +54,7 @@ const TopWidgetsRow: React.FC<Props> = () => {
}
}, [review, isUserTheFacilitator, currentReview, openReviewDialog]);

// TODO
const contactUs = () => ({});
const contactUs = useNavigateOutsideTo(ExternalUrl.CONTACT_US, true);

return (
<>
Expand Down

0 comments on commit 6e2c22b

Please sign in to comment.