feat: add separator between filters and list

proto-module-actu-react
Jalil Arfaoui 2023-02-07 01:11:01 +01:00
parent 8177706ed0
commit fe99df72c4
3 changed files with 12 additions and 6 deletions

View File

@ -0,0 +1,7 @@
export const Separator = () => <div className="sqs-block horizontalrule-block sqs-block-horizontalrule"
data-block-type="47"
id="block-yui_3_17_2_1_1663092647761_201089">
<div className="sqs-block-content">
<hr/>
</div>
</div>;

View File

@ -5,6 +5,7 @@ import {Resistant} from "../../Resistant";
import {Group, TextInput} from "@mantine/core";
import {FiltreDepartement} from "./FiltreDepartement";
import {IconUsers} from "@tabler/icons-react";
import {Separator} from "../../components/Separator";
export const resistantsLoader = async () => {
const spreadsheetId = '1GL1MBChnwNn0t8WtKK5M3PbtCJ_bTJRhoTwAI9jeWck'
@ -34,6 +35,8 @@ export const ListeResistants = () => {
<FiltreDepartement onChange={setDepartement}/>
</Group>
<Separator />
{resistants
.filter(r => !nom || normalize(r.noms).includes(normalize(nom.toLowerCase())))
.filter(r => !departement || normalize(r.departement).includes(normalize(departement)))

View File

@ -1,5 +1,6 @@
import {Resistant} from "../Resistant";
import {useNavigate} from "react-router";
import {Separator} from "../components/Separator";
interface Props {
resistant: Resistant
@ -68,12 +69,7 @@ export const ResistantRow = ({resistant}: Props) => {
</div>
<div className="sqs-block horizontalrule-block sqs-block-horizontalrule" data-block-type="47"
id="block-yui_3_17_2_1_1663092647761_201089">
<div className="sqs-block-content">
<hr/>
</div>
</div>
<Separator/>
</>
);
}