From 52f2219a38b8d5c126cc08b81f84f7ba5d4b0e81 Mon Sep 17 00:00:00 2001 From: johnnadeluy Date: Wed, 6 Mar 2024 08:02:21 +0100 Subject: [PATCH] . Co-authored-by: Johnny Niklasson --- src/pages/SharedBucketDetail/SharedBucketDetail.tsx | 6 +++--- .../{sharedBucketsDetail.ts => sharedBucketDetail.ts} | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/services/{sharedBucketsDetail.ts => sharedBucketDetail.ts} (96%) diff --git a/src/pages/SharedBucketDetail/SharedBucketDetail.tsx b/src/pages/SharedBucketDetail/SharedBucketDetail.tsx index 29deb960..8b230e46 100644 --- a/src/pages/SharedBucketDetail/SharedBucketDetail.tsx +++ b/src/pages/SharedBucketDetail/SharedBucketDetail.tsx @@ -3,16 +3,16 @@ import styles from '../../components/PageLayout/pagelayout.module.scss' import PageLayout from '../../components/PageLayout/PageLayout' import PageSkeleton from '../../components/PageSkeleton/PageSkeleton' +import FormattedTableColumn from '../../components/FormattedTableColumn' import Table, { TableData } from '../../components/Table/Table' import { ApiError } from '../../utils/services' +import { Team, SharedBucket, SharedBucketDetail, getSharedBucketDetailData } from '../../services/sharedBucketDetail' import { DaplaCtrlContext } from '../../provider/DaplaCtrlProvider' import { useState, useEffect, useContext } from 'react' import { useParams } from 'react-router-dom' import { Dialog, LeadParagraph, Text } from '@statisticsnorway/ssb-component-library' -import { Team, SharedBucket, SharedBucketDetail, getSharedBucketsDetailData } from '../../services/sharedBucketsDetail' -import FormattedTableColumn from '../../components/FormattedTableColumn' const SharedBucketDetail = () => { const { setBreadcrumbTeamDetailDisplayName, setBreadcrumbBucketDetailDisplayName } = useContext(DaplaCtrlContext) @@ -35,7 +35,7 @@ const SharedBucketDetail = () => { useEffect(() => { if (!teamId && !shortName) return - getSharedBucketsDetailData(teamId as string, shortName as string) + getSharedBucketDetailData(teamId as string, shortName as string) .then((response) => { setSharedBucketData(response) setSharedBucketTableData(prepSharedBucketTableData(response)) diff --git a/src/services/sharedBucketsDetail.ts b/src/services/sharedBucketDetail.ts similarity index 96% rename from src/services/sharedBucketsDetail.ts rename to src/services/sharedBucketDetail.ts index 30025402..21c38367 100644 --- a/src/services/sharedBucketsDetail.ts +++ b/src/services/sharedBucketDetail.ts @@ -75,7 +75,7 @@ export const fetchSharedBucketDetailData = async (teamId: string, shortName: str } } -export const getSharedBucketsDetailData = async (teamId: string, shortName: string): Promise => { +export const getSharedBucketDetailData = async (teamId: string, shortName: string): Promise => { try { const [team, sharedBucket] = await Promise.all([ fetchTeamDetail(teamId),