Skip to content

Commit

Permalink
Merge pull request #135 from Program-AR/numericChallengeIds
Browse files Browse the repository at this point in the history
Numeric challenge ids & develop react fix
  • Loading branch information
asanzo authored Nov 7, 2023
2 parents f4e341b + 6b0f8ac commit d05c00e
Show file tree
Hide file tree
Showing 12 changed files with 799 additions and 1,519 deletions.
568 changes: 142 additions & 426 deletions locales/en-us/challenges.json

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions locales/en-us/chapters.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,20 @@
},
"Desafios complementarios": {
"title": "Complementary challenges"
},
"1": {
"title": "Automatons, commands, procedures, and repetition"
},
"2": {
"title": "Conditional alternative"
},
"3": {
"title": "Conditional repetition"
},
"4": {
"title": "Numerical sensors"
},
"5": {
"title": "Solutions parameterizing"
}
}
722 changes: 185 additions & 537 deletions locales/es-ar/challenges.json

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions locales/es-ar/chapters.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,20 @@
},
"Desafios complementarios": {
"title": "Desafíos complementarios"
},
"1": {
"title": "Autómatas, comandos, procedimientos y repetición"
},
"2": {
"title": "Alternativa condicional"
},
"3": {
"title": "Repetición condicional"
},
"4": {
"title": "Sensores Numéricos"
},
"5": {
"title": "Parametrización de soluciones"
}
}
556 changes: 139 additions & 417 deletions locales/pt-br/challenges.json

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions locales/pt-br/chapters.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,20 @@
},
"Desafios complementarios": {
"title": "Desafios complementares"
},
"1": {
"title": "Autômatos, comandos, procedimentos e repetição"
},
"2": {
"title": "Alternativa condicional"
},
"3": {
"title": "Repetição condicional"
},
"4": {
"title": "Sensores Numéricos"
},
"5": {
"title": "Parametrização de Soluções"
}
}
2 changes: 1 addition & 1 deletion scripts/copyEmberPB.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PB_APP_VERSION="1.16.2"
PB_APP_VERSION="1.16.3"

echo "==> Downloading Pilas Bloques app online..."
mkdir -p tmp
Expand Down
10 changes: 2 additions & 8 deletions src/components/ChallengeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const ChallengeBreadcrumb = (path: PathToChallenge) => {

type ChallengeViewProps = {
challengeId: number
textChallengeId?: string
}

const ChallengeView = (props: ChallengeViewProps) => {
Expand All @@ -58,19 +57,14 @@ const ChallengeView = (props: ChallengeViewProps) => {

return <>
<Header CenterComponent={ChallengeBreadcrumb(path)} />
<EmberView path={`desafio/${props.textChallengeId ? props.textChallengeId : props.challengeId}${solutionParam}`} />
<EmberView path={`desafio/${props.challengeId}${solutionParam}`} />
</>
}


export const ChallengeById = () => {
const { id } = useParams()
/* TEMPORAL hasta cambiar ids en PB Ember a numeros 100x ? */
let textId = id
let numId = Number(id)
if( id?.includes('nuevo'))
numId = Number(id.replace('nuevo','')) + 1000
return <ChallengeView challengeId={numId} textChallengeId={textId} />
return <ChallengeView challengeId={Number(id)}/>
}

export const ChallengeByName = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/staticData/books.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const rawBooksData: RawBookData[] = [
},
{
id: 1000,
chapterIds: ['Nuevos Desafios'],
chapterIds: ['1','2','3','4','5'],
simpleReadMode: true
},
];
Loading

0 comments on commit d05c00e

Please sign in to comment.