Skip to content

Commit

Permalink
Revert "Para huayra. Nuevos personajes en libros"
Browse files Browse the repository at this point in the history
This reverts commit 88a3009.
  • Loading branch information
rgonzalezt committed Dec 28, 2023
1 parent 0d6103a commit 5b89be0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/components/home/BookCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { LinkCard } from "./HomeCard"
import { useTranslation } from "react-i18next"
import styles from './home.module.css';

const SURGE_HOST = 'pbdevelop.surge.sh' //This is needed to show the new exercises in surge
const shouldShow = process.env.NODE_ENV !== 'production' || window.location.host === SURGE_HOST

const InitialBookCard = () => {
const {t} = useTranslation("home")
return <LinkCard url="/libros/1" text={t("cards.initial")} color="#FCE43E" image={"toto-initial-level.svg"} />
Expand All @@ -18,10 +21,16 @@ const AdvancedBookCard = () => {
return <LinkCard url="/libros/3" text={t("cards.advanced")} color="#32CFC1" image={"toto-advanced-level.svg"} />
}

const NewChallengesBookCard = () => {
const {t} = useTranslation("home")
return <LinkCard url="/libros/1000" text={t("cards.newChallenges")} color="#C469FF" image={"new-challenges-level.png"} />
}

export const BookCards = () => (
<Stack direction='row' className={styles['home-container']}>
<InitialBookCard />
<IntermediateBookCard />
<AdvancedBookCard />
{shouldShow ? <NewChallengesBookCard />:<></>}
</Stack>
)
11 changes: 8 additions & 3 deletions src/staticData/books.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,23 @@ const rawBooksData: RawBookData[] = [
},
{
id: 2,
chapterIds: ['1','2','3','4'],
chapterIds: ['Autómatas, comandos, procedimientos y repetición', 'Alternativa condicional', 'Repetición condicional', 'Sensores Numéricos'],
simpleReadMode: false,
expectations: {
decomposition: true
}
},
{
id: 3,
chapterIds: ['5'],
chapterIds: ['Parametrización de soluciones'],
simpleReadMode: false,
expectations: {
decomposition: true
}
}
},
{
id: 1000,
chapterIds: ['1','2','3','4','5'],
simpleReadMode: false
},
];

0 comments on commit 5b89be0

Please sign in to comment.