mazipan / pramuka-id

🌴 Kumpulan informasi digital mengenai berbagai materi pramuka, materi kenegaraan dan materi kecakapan umum
https://pramuka-id.vercel.app/
MIT License
98 stars 32 forks source link

refactor(expansion.js): refactor ui component and replace expansion #77

Closed herkahahaha closed 4 years ago

herkahahaha commented 4 years ago

Background

break expansion components and replace over multiple pages using props


import Expansion from '../components/Expansion'

...
<div className="text-left">
        {PedomanSkuData.map((section, index) => (
          <Expansion
            key={index}
            index={index}
            title={section.typeDetail}
            value={
              // parse the data content into value props
              section.data.map((step, indexStep) => (
              <li key={step.title}>
                <p className="font-bold">
                  {indexStep + 1}. {step.title}
                </p>
                <p className="ml-4 mb-4 mt-2 text-base">Artinya: {step.meaning}</p>
              </li>
            ))}
          />
        ))}
</div>

Changes

  1. Add new base component expansion.js
  2. Import and Replace expansion.js into pages component
    • pages/hari-peringatan-nasional.js
    • pages/lagu-lagu-pramuka.js
    • pages/pedoman-sku.js
    • pages/salam-pramuka.js
    • pages/seragam-pramuka.js
    • pages/tanda-kecakapan-khusus.js
    • pages/tepuk-pramuka.js

Testing

vercel[bot] commented 4 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mazipan/buku-saku-pramuka/kgsc9brgz
✅ Preview: https://buku-saku-pramuka-git-herka.mazipan.vercel.app

herkahahaha commented 4 years ago

Kelihatannya sih oke nih, let me know kalau sudah siap di merge ya @herkahahaha

okaay siap mas ipan, dibranch lain lagi coba nge-redesign ulang, cuman masih ancuur belum berani PR hehehe