fix(help): add param for correct category
This commit is contained in:
@ -37,7 +37,10 @@ function createQuestionEpic(action$, { getState }, { window }) {
|
|||||||
tap(() => {
|
tap(() => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const files = challengeFilesSelector(state);
|
const files = challengeFilesSelector(state);
|
||||||
const { title: challengeTitle } = challengeMetaSelector(state);
|
const {
|
||||||
|
title: challengeTitle,
|
||||||
|
challengeType: challengeType
|
||||||
|
} = challengeMetaSelector(state);
|
||||||
const { navigator: { userAgent }, location: { href } } = window;
|
const { navigator: { userAgent }, location: { href } } = window;
|
||||||
const textMessage = [
|
const textMessage = [
|
||||||
"**Tell us what's happening:**\n\n\n\n",
|
"**Tell us what's happening:**\n\n\n\n",
|
||||||
@ -50,10 +53,11 @@ function createQuestionEpic(action$, { getState }, { window }) {
|
|||||||
'**Link to the challenge:**\n',
|
'**Link to the challenge:**\n',
|
||||||
href
|
href
|
||||||
].join('');
|
].join('');
|
||||||
|
const categories = ['HTML-CSS', 'JavaScript'];
|
||||||
window.open(
|
window.open(
|
||||||
'https://forum.freecodecamp.org/new-topic' +
|
'https://forum.freecodecamp.org/new-topic' +
|
||||||
'?category=help' +
|
'?category=' +
|
||||||
|
window.encodeURIComponent(categories[challengeType] || 'Help') +
|
||||||
'&title=' +
|
'&title=' +
|
||||||
window.encodeURIComponent(challengeTitle) +
|
window.encodeURIComponent(challengeTitle) +
|
||||||
'&body=' +
|
'&body=' +
|
||||||
|
Reference in New Issue
Block a user