Skip to content

Commit

Permalink
DIGG-449: Organisation link
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro Gasperini authored and Alessandro Gasperini committed Dec 6, 2024
1 parent cdc3bf4 commit 33cf9f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
8 changes: 4 additions & 4 deletions features/entryscape/dataset-page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ export const DatasetPage: FC = () => {
{/* Left column */}
<div className="mb-lg flex w-full max-w-md flex-col gap-lg lg:mb-xl">
{/* Publisher */}
{entry.organisationLink && entry.organisationLink.url ? (
{entry.organisationLink ? (
<Link
className="hover:!no-underline text-green-600 text-lg"
href={entry.organisationLink.url}
className="text-lg text-green-600 hover:!no-underline"
href={entry.organisationLink}
>
{entry.organisationLink.title}
{entry.publisher}
</Link>
) : (
entry.publisher && (
Expand Down
7 changes: 2 additions & 5 deletions providers/entrystore-provider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export interface ESEntry {
keywords?: Array<string>;
mqaCatalog?: { title: string; url: string } | null;
organisationData?: OrganisationData;
organisationLink?: RelationObj | null;
organisationLink?: string | null;
}

export interface ESContact {
Expand Down Expand Up @@ -284,10 +284,7 @@ export const EntrystoreProvider: FC<EntrystoreProviderProps> = ({
);
entryData.mqaCatalog = await getRelatedMQA(entry);
if (publisherUri && publisherEntry) {
entryData.organisationLink = {
url: `/organisations/${publisherEntry.getContext().getId()}_${publisherEntry.getId()}`,
title: publisher,
};
entryData.organisationLink = `/organisations/${publisherEntry.getContext().getId()}_${publisherEntry.getId()}`
}
break;
case "dataservice":
Expand Down

0 comments on commit 33cf9f3

Please sign in to comment.