Skip to content

Commit

Permalink
fix: get account id from url param
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadshaheer committed Jan 29, 2025
1 parent 64955d8 commit 5cefa40
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { SelectProps, TabsProps } from 'antd';
import { Select, Tabs } from 'antd';
import { getAwsServices } from 'api/integrations/aws';
import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';
import useUrlQuery from 'hooks/useUrlQuery';
import { ChevronDown } from 'lucide-react';
import { useMemo, useState } from 'react';
import { useQuery } from 'react-query';
Expand Down Expand Up @@ -74,11 +75,10 @@ function ServicesFilter({
);
}

interface ServicesSectionProps {
accountId: string;
}
function ServicesSection(): JSX.Element {
const urlQuery = useUrlQuery();
const accountId = urlQuery.get('accountId') || '';

function ServicesSection({ accountId }: ServicesSectionProps): JSX.Element {
const [activeFilter, setActiveFilter] = useState<
'all_services' | 'enabled' | 'available'
>('all_services');
Expand All @@ -96,16 +96,12 @@ function ServicesSection({ accountId }: ServicesSectionProps): JSX.Element {
);
}

interface ServicesTabsProps {
accountId: string;
}

function ServicesTabs({ accountId }: ServicesTabsProps): JSX.Element {
function ServicesTabs(): JSX.Element {
const tabItems: TabsProps['items'] = [
{
key: 'services',
label: 'Services For Integration',
children: <ServicesSection accountId={accountId} />,
children: <ServicesSection />,
},
];

Expand Down

0 comments on commit 5cefa40

Please sign in to comment.