replace unknown type with explicit type

This commit is contained in:
Kim, Jimin 2022-01-06 14:57:36 +09:00
parent aa526df013
commit bff6e053a3

View file

@ -107,7 +107,7 @@ const Search = () => {
const [selectedTags, setSelectedTags] = useState<TagsData[]>([])
const [searchInput, setSearchInput] = useState("")
const [postCards, setPostCards] = useState<unknown[]>([])
const [postCards, setPostCards] = useState<JSX.Element[]>([])
// parse search parameters
useEffect(() => {
@ -188,7 +188,7 @@ const Search = () => {
function doSearch() {
try {
const _postCards: unknown[] = []
const _postCards: JSX.Element[] = []
for (const res of searchIndex.search(searchInput)) {
const postData = map.posts[res.ref]