Skip to content

Commit

Permalink
Merge pull request #73 from kaogeek/72-fix-bug-no-chapter-text-on-non…
Browse files Browse the repository at this point in the history
…-numeric

#72 fix bug on search page - no chapter text on non numeric chapter
  • Loading branch information
GravitySow authored Mar 13, 2024
2 parents 5cbca5b + 0929be2 commit 8a34383
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/Search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default function Search({ searchInputValue, setSearchInputValue }) {
.append(createDataObject(data).search('ผู้อภิปราย', searchInputValue))
.append(createDataObject(data).search('ประเด็นการพิจารณา', searchInputValue))
.append(createDataObject(data).search('ร่างบทบัญญัติ', searchInputValue))
setArticleResult([...new Set(articleSearch.data.map(obj => (isNumeric(obj.มาตรา) ? "มาตรา " : "") + obj.มาตรา + " (หมวด "+obj.หมวด+" "+ chapterIdToName[obj.หมวด] + ")"))].filter(value => value !== "").splice(0, 5));
setArticleResult([...new Set(articleSearch.data.map(obj => (isNumeric(obj.มาตรา) ? "มาตรา " : "") + obj.มาตรา + " ("+(isNumeric(obj.หมวด) ? "หมวด " + obj.หมวด + " " : "") + chapterIdToName[obj.หมวด] + ")"))].filter(value => value !== "").splice(0, 5));
// discussionist
// search by name
let discussionistNameSearch = [...new Set(createDataObject(data)
Expand Down

0 comments on commit 8a34383

Please sign in to comment.