diff --git a/src/pages/Townhall.js b/src/pages/Townhall.js index 5a2d28e..3d7892b 100644 --- a/src/pages/Townhall.js +++ b/src/pages/Townhall.js @@ -1,5 +1,5 @@ import React, { Component } from 'react' -import TownhallSection from "./TownhallSection/TownhallSection"; +import TownhallSection from "./Townhall/TownhallSection/TownhallSection"; import 'antd/lib/button/style/index.css'; import 'antd/lib/menu/style/index.css'; import 'antd/lib/dropdown/style/index.css'; diff --git a/src/pages/TitleSearch.js b/src/pages/Townhall/TownhallSection/TitleSearch.js similarity index 89% rename from src/pages/TitleSearch.js rename to src/pages/Townhall/TownhallSection/TitleSearch.js index 911284b..e579bf2 100644 --- a/src/pages/TitleSearch.js +++ b/src/pages/Townhall/TownhallSection/TitleSearch.js @@ -1,7 +1,7 @@ import React from "react"; import { Input } from "antd"; -const Search = Input.Search; +const { Search } = Input; export const TitleSearch = ({ onSearch, ...props }) => (
diff --git a/src/pages/TownhallSection/TownhallSection.js b/src/pages/Townhall/TownhallSection/TownhallSection.js similarity index 96% rename from src/pages/TownhallSection/TownhallSection.js rename to src/pages/Townhall/TownhallSection/TownhallSection.js index ed584d1..d92f33c 100644 --- a/src/pages/TownhallSection/TownhallSection.js +++ b/src/pages/Townhall/TownhallSection/TownhallSection.js @@ -2,7 +2,7 @@ import React, { Component } from "react"; import { connect } from 'react-redux' import styles from "./style.module.css"; import { TownhallTable } from "../TownhallTable"; -import { TitleSearch } from "../TitleSearch"; +import { TitleSearch } from "./TitleSearch"; const townhallData = [ { @@ -130,8 +130,8 @@ class TownhallSection extends Component { }; handleSearch = searchText => { - const filteredEvents = townhallData.filter(({ title }) => { - return title.includes(searchText); + const filteredEvents = townhallData.filter(({ date }) => { + return date.includes(searchText); }); this.setState({ diff --git a/src/pages/TownhallSection/style.module.css b/src/pages/Townhall/TownhallSection/style.module.css similarity index 100% rename from src/pages/TownhallSection/style.module.css rename to src/pages/Townhall/TownhallSection/style.module.css diff --git a/src/pages/TownhallTable/TownhallTable.js b/src/pages/Townhall/TownhallTable/TownhallTable.js similarity index 97% rename from src/pages/TownhallTable/TownhallTable.js rename to src/pages/Townhall/TownhallTable/TownhallTable.js index 63a3ad1..6307c4d 100644 --- a/src/pages/TownhallTable/TownhallTable.js +++ b/src/pages/Townhall/TownhallTable/TownhallTable.js @@ -3,7 +3,6 @@ import Table from "antd/lib/table"; import Button from "antd/lib/button"; - import { actionService } from "./townhallService"; const TownhallTable = ({ townhallData }) => { @@ -23,7 +22,7 @@ const TownhallTable = ({ townhallData }) => { key: "title" }, { - title: "Date", + title: "Date (YYYY-MM-DD)", dataIndex: "date", key: "date" }, diff --git a/src/pages/TownhallTable/index.js b/src/pages/Townhall/TownhallTable/index.js similarity index 100% rename from src/pages/TownhallTable/index.js rename to src/pages/Townhall/TownhallTable/index.js diff --git a/src/pages/TownhallTable/townhallService.js b/src/pages/Townhall/TownhallTable/townhallService.js similarity index 100% rename from src/pages/TownhallTable/townhallService.js rename to src/pages/Townhall/TownhallTable/townhallService.js