Skip to content

Commit e8ec52c

Browse files
Merge pull request #320 from CivicDataLab/319-add-tooltip-in-sector
Added ToolTip in Sectors
2 parents 25b0840 + 737e4aa commit e8ec52c

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

app/[locale]/(user)/sectors/SectorsListing.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
SectorsListsQuery,
1111
} from '@/gql/generated/graphql';
1212
import { useQuery } from '@tanstack/react-query';
13-
import { Divider, SearchInput, Select, Spinner, Text } from 'opub-ui';
13+
import { Divider, SearchInput, Select, Spinner, Text, Tooltip } from 'opub-ui';
1414

1515
import { GraphQL } from '@/lib/api';
1616
import { cn, generateJsonLd } from '@/lib/utils';
@@ -217,13 +217,15 @@ const SectorsListing = () => {
217217
{' '}
218218
{/* min-w-0 prevents text overflow */}
219219
<div className="flex flex-col gap-2">
220-
<Text
220+
<Tooltip content={sectors.name}>
221+
<Text
221222
variant="headingLg"
222223
fontWeight="semibold"
223224
className="line-clamp-1 text-ellipsis overflow-hidden"
224225
>
225226
{sectors.name}
226227
</Text>
228+
</Tooltip>
227229
<Divider className="h-[2px] bg-greyExtralight" />
228230
</div>
229231
<div className="flex gap-1">

lib/navigation.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,16 @@ function useOnComplete() {
2020
const searchParams = useSearchParams();
2121
React.useEffect(() => navigateEnd(), [pathname, searchParams]);
2222
}
23-
24-
function __RouterEvents() {
23+
function InternalRouterEvents() {
2524
useOnComplete();
2625
return null;
2726
}
2827

29-
// https://github.com/joulev/nextjs13-appdir-router-events/blob/52e3457f183b0b638cd14c6c0e8c138e71a76895/app/router-events.tsx
3028
export function RouterEvents() {
3129
return (
3230
<React.Suspense>
33-
<__RouterEvents />
31+
<InternalRouterEvents />
3432
</React.Suspense>
3533
);
3634
}
35+

0 commit comments

Comments
 (0)