feat(learn): add backend solution url to help post (#40950)

Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
pull/41010/head
Shaun Hamilton 2021-02-09 05:53:10 +00:00 committed by GitHub
parent b45e78d1ee
commit 98ff6823e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 4 deletions

View File

@ -4,7 +4,8 @@ import {
types,
closeModal,
challengeFilesSelector,
challengeMetaSelector
challengeMetaSelector,
projectFormValuesSelector
} from '../redux';
import { tap, mapTo } from 'rxjs/operators';
import { forumLocation } from '../../../../../config/env.json';
@ -35,7 +36,9 @@ function createQuestionEpic(action$, state$, { window }) {
navigator: { userAgent },
location: { href }
} = window;
const projectFormValues = Object.entries(
projectFormValuesSelector(state)
);
const endingText = dedent(
`**Your browser information:**
@ -48,8 +51,18 @@ function createQuestionEpic(action$, state$, { window }) {
);
let textMessage = dedent(
`**Tell us what's happening:**\n\n\n\n**Your code so far**
${filesToMarkdown(files)}\n${endingText}`
`**Tell us what's happening:**
\n\n
${
projectFormValues.length
? `**Your project link(s)**\n`
: `**Your code so far**`
}
${projectFormValues
?.map(([key, val]) => `${key}: ${val}\n`)
?.join('') || filesToMarkdown(files)}
\n
${endingText}`
);
const altTextMessage = dedent(