Skip to content

Commit

Permalink
chore: proper url for one equinor link
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggling committed Feb 26, 2024
1 parent 10cc29d commit bb1bf13
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Card, Icon } from '@equinor/eds-core-react';
import { external_link } from '@equinor/eds-icons';
import styled from 'styled-components';
import { OneEquinorIcon } from './Icon';
import { getFusionPortalURL } from '@portal/utils';

const Styles = {
Link: styled.a`
Expand Down Expand Up @@ -45,11 +46,14 @@ export const OneEquinorLink = () => {
const context = useFrameworkCurrentContext();
const equinorTask = useRelationsByType('EquinorTask', context?.id);

// https://fusion.equinor.com/apps/one-equinor/org-unit/53014029/task/673024d2-e311-44a7-733e-08dbc8a2fb29
if (equinorTask[0]?.value.orgUnitSapId) {
return (
<Card elevation="raised">
<Styles.Link
href={`https://fusion.equinor.com/apps/one-equinor/org-unit/${equinorTask[0].value.orgUnitSapId}/info`}
href={`${getFusionPortalURL()}/apps/one-equinor/org-unit/${
equinorTask[0].value.orgUnitSapId
}/task/${equinorTask[0].externalId}`}
aria-label="View in this project master in One Equinor"
target="_blank"
>
Expand Down

0 comments on commit bb1bf13

Please sign in to comment.