Skip to content

Commit

Permalink
Merge pull request #1893 from bcgov/feat/daniel-add-help-links-1853
Browse files Browse the repository at this point in the history
feat: Add Help Links to Settings Cards
  • Loading branch information
dhaselhan authored Feb 3, 2025
2 parents 077d570 + 1113bf8 commit a73fc53
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
3 changes: 3 additions & 0 deletions frontend/src/constants/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@ export const DEFAULT_CI_FUEL = {

export const PHONE_REGEX =
/^((\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4})?$/

export const HELP_GUIDE_URL =
'https://www2.gov.bc.ca/gov/content?id=7A58AF3855154747A0793F0C9A6E9089'
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import BCTypography from '@/components/BCTypography'
import withRole from '@/utils/withRole'
import { nonGovRoles } from '@/constants/roles'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faArrowUpRightFromSquare } from '@fortawesome/free-solid-svg-icons'
import { faShareFromSquare } from '@fortawesome/free-solid-svg-icons'
import { useCurrentUser } from '@/hooks/useCurrentUser'
import { ROUTES } from '@/constants/routes'
import { HELP_GUIDE_URL } from '@/constants/common.js'

const linkStyle = {
textDecoration: 'underline',
Expand Down Expand Up @@ -59,6 +60,16 @@ const OrgUserSettingsCard = () => {
>
{t('dashboard:orgUserSettings.configureNotifications')}
</UserSettingsLink>

<a href={HELP_GUIDE_URL} target="_blank" rel="noreferrer">
<UserSettingsLink>
{t('dashboard:orgUserSettings.help')}
<FontAwesomeIcon
icon={faShareFromSquare}
style={{ color: '#547D59', marginLeft: 6 }}
/>
</UserSettingsLink>
</a>
</List>
</Stack>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import BCTypography from '@/components/BCTypography'
import withRole from '@/utils/withRole'
import { govRoles } from '@/constants/roles'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faArrowUpRightFromSquare } from '@fortawesome/free-solid-svg-icons'
import { faShareFromSquare } from '@fortawesome/free-solid-svg-icons'
import { useCurrentUser } from '@/hooks/useCurrentUser'
import { ROUTES } from '@/constants/routes'
import { HELP_GUIDE_URL } from '@/constants/common.js'

const linkStyle = {
textDecoration: 'underline',
Expand Down Expand Up @@ -59,6 +60,16 @@ const UserSettingsCard = () => {
>
{t('dashboard:userSettings.configureNotifications')}
</UserSettingsLink>

<a href={HELP_GUIDE_URL} target="_blank" rel="noreferrer">
<UserSettingsLink>
{t('dashboard:userSettings.help')}
<FontAwesomeIcon
icon={faShareFromSquare}
style={{ color: '#547D59', marginLeft: 6 }}
/>
</UserSettingsLink>
</a>
</List>
</Stack>
}
Expand Down

0 comments on commit a73fc53

Please sign in to comment.