Skip to content
Commits on Source (3)
## [1.31.3](https://gitlab.com/TIBHannover/orkg/orkg-ask/frontend/compare/v1.31.2...v1.31.3) (2024-10-30)
### Bug Fixes
* prevent issue that breaks item page if incorrect URLs are provided ([1b7d4dc](https://gitlab.com/TIBHannover/orkg/orkg-ask/frontend/commit/1b7d4dc504919913bab8652e2bf66190a02b6e90))
## [1.31.2](https://gitlab.com/TIBHannover/orkg/orkg-ask/frontend/compare/v1.31.1...v1.31.2) (2024-10-08)
......
{
"name": "orkg-ask",
"version": "1.31.2",
"version": "1.31.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "orkg-ask",
"version": "1.31.2",
"version": "1.31.3",
"dependencies": {
"@dnd-kit/core": "^6.1.0",
"@dnd-kit/sortable": "^8.0.0",
......
{
"name": "orkg-ask",
"version": "1.31.2",
"version": "1.31.3",
"private": true,
"scripts": {
"dev": "NODE_OPTIONS='--inspect' next dev --turbo",
......
......@@ -19,6 +19,7 @@ import {
PopoverTrigger,
useDisclosure,
} from '@nextui-org/react';
import { uniq } from 'lodash';
import { useTranslations } from 'next-intl';
import { ReactElement } from 'react';
......@@ -93,16 +94,26 @@ export default function ActionButtons({
className="max-w-[300px]"
>
<DropdownSection title="Sources" showDivider>
{links.map((link, index) => (
<DropdownItem
key={link}
as={Link}
href={link}
target="_blank"
>
{index + 1}. {new URL(link).hostname ?? link}
</DropdownItem>
))}
{uniq(links).map((link, index) => {
// use uniq to filter out potential duplicate links
let hostname;
try {
hostname = new URL(link).hostname;
} catch (e) {
hostname = link;
}
return (
<DropdownItem
key={link}
as={Link}
href={link}
target="_blank"
>
{index + 1}. {hostname ?? link}
</DropdownItem>
);
})}
</DropdownSection>
<DropdownSection title={t('soft_civil_guppy_read')}>
<DropdownItem
......