diff --git a/apps/admin-x-activitypub/package.json b/apps/admin-x-activitypub/package.json index 8431203950..1911c4b190 100644 --- a/apps/admin-x-activitypub/package.json +++ b/apps/admin-x-activitypub/package.json @@ -36,10 +36,13 @@ "@testing-library/react": "14.1.0", "@tryghost/admin-x-design-system": "0.0.0", "@tryghost/admin-x-framework": "0.0.0", + "@types/jest": "29.5.12", "@types/react": "18.3.3", "@types/react-dom": "18.3.0", + "jest": "29.7.0", "react": "18.3.1", - "react-dom": "18.3.1" + "react-dom": "18.3.1", + "ts-jest": "29.1.5" }, "nx": { "targets": { diff --git a/apps/admin-x-activitypub/src/components/ListIndex.tsx b/apps/admin-x-activitypub/src/components/ListIndex.tsx index 7c109c8ba8..a86ada0444 100644 --- a/apps/admin-x-activitypub/src/components/ListIndex.tsx +++ b/apps/admin-x-activitypub/src/components/ListIndex.tsx @@ -1,10 +1,9 @@ // import NiceModal from '@ebay/nice-modal-react'; -// import ActivityPubWelcomeImage from '../assets/images/ap-welcome.png'; -import React, {useState} from 'react'; +import ActivityPubWelcomeImage from '../assets/images/ap-welcome.png'; +import React, {useEffect, useRef, useState} from 'react'; import articleBodyStyles from './articleBodyStyles'; -import getUsername from '../utils/get-username'; import {ActorProperties, ObjectProperties, useBrowseFollowersForUser, useBrowseFollowingForUser, useBrowseInboxForUser} from '@tryghost/admin-x-framework/api/activitypub'; -import {Avatar, Button, Heading, List, ListItem, Page, SettingValue, ViewContainer, ViewTab} from '@tryghost/admin-x-design-system'; +import {Avatar, Button, ButtonGroup, Heading, List, ListItem, Page, SelectOption, SettingValue, ViewContainer, ViewTab} from '@tryghost/admin-x-design-system'; import {useBrowseSite} from '@tryghost/admin-x-framework/api/site'; import {useRouting} from '@tryghost/admin-x-framework/routing'; @@ -33,6 +32,8 @@ const ActivityPubComponent: React.FC = () => { setArticleContent(null); }; + const [selectedOption, setSelectedOption] = useState({label: 'Inbox', value: 'inbox'}); + const [selectedTab, setSelectedTab] = useState('inbox'); const tabs: ViewTab[] = [ @@ -40,15 +41,15 @@ const ActivityPubComponent: React.FC = () => { id: 'inbox', title: 'Inbox', contents:
-