|
@@ -1,9 +1,9 @@
|
1
|
1
|
import { IonContent, IonItem, IonLabel, IonListHeader } from "@ionic/react";
|
2
|
2
|
import "../components/ListComponent.css";
|
3
|
3
|
|
4
|
|
-const ListComponent: React.FC<{ title?: string; laws: string[] }> = (props) => {
|
|
4
|
+const ListComponent: React.FC<{ title?: string; items: string[] }> = (props) => {
|
5
|
5
|
const title = props.title;
|
6
|
|
- const laws = props.laws;
|
|
6
|
+ const items = props.items;
|
7
|
7
|
return (
|
8
|
8
|
<IonContent>
|
9
|
9
|
{title ? (
|
|
@@ -12,10 +12,10 @@ const ListComponent: React.FC<{ title?: string; laws: string[] }> = (props) => {
|
12
|
12
|
</IonListHeader>
|
13
|
13
|
) : null}
|
14
|
14
|
|
15
|
|
- {laws.map((lawName: string) => {
|
|
15
|
+ {items.map((itemName: string) => {
|
16
|
16
|
return (
|
17
|
|
- <IonItem routerLink={`/article/${encodeURIComponent(lawName)}`}>
|
18
|
|
- <p className="ListItemText">{lawName}</p>
|
|
17
|
+ <IonItem routerLink={`/article/${encodeURIComponent(itemName)}`}>
|
|
18
|
+ <p className="ListItemText">{itemName}</p>
|
19
|
19
|
</IonItem>
|
20
|
20
|
);
|
21
|
21
|
})}
|