Skip to content

Commit

Permalink
Merge pull request #6 from daodaoedu/fix/resouce-title
Browse files Browse the repository at this point in the history
fix: resource title
  • Loading branch information
pepe1113 authored Jul 5, 2023
2 parents 6d8a8ec + cc2c4cf commit 871e62c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions components/Search/SearchResultList/Item/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,11 @@ const Item = ({ data, queryTags }) => {
[data],
);

const title = useMemo(
() =>
(data?.properties['資源名稱']?.title ?? []).find(
(item) => item?.type === 'text',
)?.plain_text,
[data?.properties],
);
const titleTextList = (data?.properties['資源名稱']?.title ?? [])
.filter((item) => item?.type === 'text')
.map((item) => item?.plain_text);

const title = useMemo(() => titleTextList.join(''), [data?.properties]);

const contributors = useMemo(
() => data?.properties['創建者']?.multi_select ?? [],
Expand Down

1 comment on commit 871e62c

@vercel
Copy link

@vercel vercel bot commented on 871e62c Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

daodao-f2e – ./

daodao-f2e-daodaoedu.vercel.app
daodao-f2e-git-dev-daodaoedu.vercel.app
daodao-f2e.vercel.app

Please sign in to comment.