-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Fix/issue 1369 bug export collection (#1370)
This PR refactors and improves the component InfoButton and fixes the issue #1369 at the same time - Refactored InfoButton component: moving contents in separate module faq.ts to improve readability and adding a warning message when the `name` prop does not match any entry in the FAQ contents. - UI on CollectionDetailPage: removed a buggy button - adjusted InfoButton offsets on Search page to improve dropdown display alignment on the search results page. --------- Co-authored-by: Daniele Guido <[email protected]>
1 parent
90276bf
commit e955208
Showing
4 changed files
with
52 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import faqContent from '@/assets/faqpage.json' | ||
// flatten down the faqContent object to get a dict like {language : { id : <item> } } | ||
export const FaqContentsMap = Object.entries(faqContent).reduce((acc, [language, item]) => { | ||
acc[language] = item.groups.reduce((acc, group) => { | ||
group.faq.forEach(faq => { | ||
acc[faq.id] = faq | ||
}) | ||
return acc | ||
}, {}) | ||
return acc | ||
}, {}) | ||
console.debug('[data/faq]', FaqContentsMap) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters