Skip to content

Commit e4049c0

Browse files
committed
feat: added links to laws
1 parent 026e958 commit e4049c0

4 files changed

Lines changed: 65 additions & 0 deletions

File tree

client/package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/public/data/logicTrees.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@
202202
{
203203
"label": "guide.nodes.res_img_laws_deepfake.options.0",
204204
"nextId": "menu_actions_img"
205+
},
206+
{
207+
"label": "Read more about this law",
208+
"url": "https://cicc.gov.ph/wp-content/uploads/2025/04/What-is-RA-10175-Brochure.pdf"
205209
}
206210
],
207211
"parentId": "q_img_nature"
@@ -738,6 +742,10 @@
738742
{
739743
"label": "guide.nodes.res_harass_threats.options.0",
740744
"nextId": "menu_actions_harass_2"
745+
},
746+
{
747+
"label": "Read more about this law",
748+
"url": "https://legalresource.ph/grave-threats-a282-revised-penal-code/#:~:text=1.,Bond%20for%20good%20behavior."
741749
}
742750
],
743751
"parentId": "q_harass_details"
@@ -751,6 +759,10 @@
751759
{
752760
"label": "guide.nodes.res_harass_safe_spaces.options.0",
753761
"nextId": "menu_actions_harass_3"
762+
},
763+
{
764+
"label": "Read more about this law",
765+
"url": "https://pcw.gov.ph/faq-republic-act-no-11313/"
754766
}
755767
],
756768
"parentId": "q_harass_details"
@@ -764,6 +776,10 @@
764776
{
765777
"label": "guide.nodes.res_harass_vawc.options.0",
766778
"nextId": "menu_actions_harass_4"
779+
},
780+
{
781+
"label": "Read more about this law",
782+
"url": "https://pcw.gov.ph/faq-republic-act-9262/"
767783
}
768784
],
769785
"parentId": "q_harass_details"
@@ -885,6 +901,10 @@
885901
{
886902
"label": "guide.nodes.res_img_laws_privacy_2.options.0",
887903
"nextId": "menu_actions_img_9"
904+
},
905+
{
906+
"label": "Read more about this law",
907+
"url": "https://privacy.gov.ph/wp-content/uploads/2022/01/DPA_QuickGuidefolder_10191.pdf"
888908
}
889909
],
890910
"parentId": "q_img_nature_2"
@@ -898,6 +918,10 @@
898918
{
899919
"label": "guide.nodes.res_img_laws_voyeur_2.options.0",
900920
"nextId": "menu_actions_img_10"
921+
},
922+
{
923+
"label": "Read more about this law",
924+
"url": "https://www.respicio.ph/bar/2025/criminal-law/special-penal-laws/anti-photo-and-video-voyeurism-act-of-2009-ra-no-9995"
901925
}
902926
],
903927
"parentId": "q_img_nature_2"
@@ -911,6 +935,10 @@
911935
{
912936
"label": "guide.nodes.res_img_laws_intimate_2.options.0",
913937
"nextId": "menu_actions_img_11"
938+
},
939+
{
940+
"label": "Read more about this law",
941+
"url": "https://pcw.gov.ph/faq-republic-act-no-11313/"
914942
}
915943
],
916944
"parentId": "q_img_nature_2"
@@ -924,6 +952,10 @@
924952
{
925953
"label": "guide.nodes.res_img_laws_minor_2.options.0",
926954
"nextId": "menu_actions_img_12"
955+
},
956+
{
957+
"label": "Read more about this law",
958+
"url": "https://www.facebook.com/share/p/1Hst1WeTvM/"
927959
}
928960
],
929961
"parentId": "q_img_nature_2"

client/src/data/logicTrees.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@
135135
{
136136
"label": "See my options for action",
137137
"nextId": "menu_actions_img"
138+
},
139+
{
140+
"label": "Read more about this law",
141+
"url": "https://cicc.gov.ph/wp-content/uploads/2025/04/What-is-RA-10175-Brochure.pdf"
138142
}
139143
]
140144
},
@@ -306,6 +310,10 @@
306310
{
307311
"label": "See my options for action",
308312
"nextId": "menu_actions_harass"
313+
},
314+
{
315+
"label": "Read more about this law",
316+
"url": "https://legalresource.ph/grave-threats-a282-revised-penal-code/#:~:text=1.,Bond%20for%20good%20behavior."
309317
}
310318
]
311319
},
@@ -318,6 +326,10 @@
318326
{
319327
"label": "See my options for action",
320328
"nextId": "menu_actions_harass"
329+
},
330+
{
331+
"label": "Read more about this law",
332+
"url": "https://pcw.gov.ph/faq-republic-act-no-11313/"
321333
}
322334
]
323335
},
@@ -330,6 +342,10 @@
330342
{
331343
"label": "See my options for action",
332344
"nextId": "menu_actions_harass"
345+
},
346+
{
347+
"label": "Read more about this law",
348+
"url": "https://pcw.gov.ph/faq-republic-act-9262/"
333349
}
334350
]
335351
},

client/src/pages/Quiz.jsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,22 @@ export default function Quiz() {
217217

218218
<div style={{ display: 'grid', gap: '1rem' }}>
219219
{node.options && node.options.map((opt, idx) => {
220+
if (opt.url) {
221+
return (
222+
<a
223+
key={idx}
224+
href={opt.url}
225+
target="_blank"
226+
rel="noopener noreferrer"
227+
className="btn btn-secondary node-option"
228+
style={{ justifyContent: 'space-between', textDecoration: 'none' }}
229+
>
230+
{t(opt.label)}
231+
<span></span>
232+
</a>
233+
);
234+
}
235+
220236
// Check if this option leads to the code passed in ?selected=...
221237
// We need to resolve the option's Real ID to its Short Code first
222238
const optCode = urlMap && urlMap.ids[opt.nextId];

0 commit comments

Comments
 (0)