Skip to content

Commit f094a9d

Browse files
committed
feat: format access data to include destination paths for apps, datasets, and workerpools
1 parent a811ac9 commit f094a9d

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

src/modules/addresses/address/access/AddressAppsAccessTable.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,15 @@ function useAddressAppsAccessData({
5252
startIndexInBatch,
5353
startIndexInBatch + PREVIEW_TABLE_LENGTH
5454
);
55+
const formattedAccess =
56+
access.map((access) => ({
57+
...access,
58+
destination: `/app/${access.order.app.toLowerCase()}`,
59+
})) ?? [];
5560
const count = data?.count || 0;
5661

5762
return {
58-
data: access,
63+
data: formattedAccess,
5964
totalCount: count,
6065
isLoading,
6166
isRefetching,

src/modules/addresses/address/access/AddressDatasetsAccessTable.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,15 @@ function useAddressDatasetsAccessData({
5858
startIndexInBatch,
5959
startIndexInBatch + PREVIEW_TABLE_LENGTH
6060
);
61+
const formattedAccess =
62+
access.map((access) => ({
63+
...access,
64+
destination: `/dataset/${access.order.dataset.toLowerCase()}`,
65+
})) ?? [];
6166
const count = data?.count || 0;
6267

6368
return {
64-
data: access,
69+
data: formattedAccess,
6570
totalCount: count,
6671
isLoading,
6772
isRefetching,

src/modules/addresses/address/access/AddressWorkerpoolsAccessTable.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,15 @@ function useAddressWorkerpoolsAccessData({
5959
startIndexInBatch,
6060
startIndexInBatch + PREVIEW_TABLE_LENGTH
6161
);
62+
const formattedAccess =
63+
access.map((access) => ({
64+
...access,
65+
destination: `/workerpool/${access.order.workerpool.toLowerCase()}`,
66+
})) ?? [];
6267
const count = data?.count || 0;
6368

6469
return {
65-
data: access,
70+
data: formattedAccess,
6671
totalCount: count,
6772
isLoading,
6873
isRefetching,

0 commit comments

Comments
 (0)