Skip to content

Commit

Permalink
fix: other links
Browse files Browse the repository at this point in the history
  • Loading branch information
LamaEats committed Mar 28, 2024
1 parent 7986282 commit 01cf8ef
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/components/GoalBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Link, nullable } from '@taskany/bricks';
import { nullable } from '@taskany/bricks';

import { Badge } from './Badge';
import { NextLink } from './NextLink';
Expand Down Expand Up @@ -29,10 +29,10 @@ export const GoalBadge: React.FC<GoalBadgeProps> = ({
icon={<StateDot view="stroke" hue={color} size="s" />}
text={nullable(
href,
() => (
<Link as={NextLink} href={href} inline onClick={onClick}>
(h) => (
<NextLink href={h} view="inline" onClick={onClick}>
{title}
</Link>
</NextLink>
),
title,
)}
Expand Down
9 changes: 4 additions & 5 deletions src/components/GoalTableList/GoalTableList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Badge, State, Table, Tag, Text, User, UserGroup } from '@taskany/bricks/harmony';
import { MouseEventHandler, useCallback, useEffect, useMemo } from 'react';
import { Link, ListViewItem, nullable } from '@taskany/bricks';
import { ListViewItem, nullable } from '@taskany/bricks';
import { IconMessageTextOutline } from '@taskany/icons';

import { TableListItem, TableListItemElement } from '../TableListItem/TableListItem';
Expand Down Expand Up @@ -161,12 +161,11 @@ export const GoalTableList = <T extends Partial<NonNullable<GoalByIdReturnType>>
return (
<Table {...attrs}>
{data.map((row) => (
<Link
<NextLink
key={row.goal.id}
as={NextLink}
href={routes.goal(row.goal?._shortId as string)}
onClick={onGoalPreviewShow(row.goal)}
inline
view="inline"
>
<ListViewItem
value={row.goal}
Expand All @@ -184,7 +183,7 @@ export const GoalTableList = <T extends Partial<NonNullable<GoalByIdReturnType>>
</TableListItem>
)}
/>
</Link>
</NextLink>
))}
</Table>
);
Expand Down
5 changes: 2 additions & 3 deletions src/components/ProjectBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { IconUsersOutline } from '@taskany/icons';
import { Link } from '@taskany/bricks';

import { routes } from '../hooks/router';

Expand All @@ -20,9 +19,9 @@ export const ProjectBadge: React.FC<ProjectBadgeProps> = ({ id, title, children,
className={className}
icon={<IconUsersOutline size="s" />}
text={
<Link as={NextLink} href={routes.project(id)} inline>
<NextLink href={routes.project(id)} view="inline">
{title}
</Link>
</NextLink>
}
action={children}
/>
Expand Down

0 comments on commit 01cf8ef

Please sign in to comment.