Skip to content

Commit a2be3b1

Browse files
committed
move coversion function from PaidSubscriber File
1 parent d657ee7 commit a2be3b1

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

src/components/relay-dashboard/paid-subscribers/PaidSubscribers.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import { useResponsive } from '@app/hooks/useResponsive';
1414
import usePaidSubscribers, { SubscriberProfile } from '@app/hooks/usePaidSubscribers';
1515
import { Row, Col, Modal, Typography } from 'antd';
1616
import { nip19 } from 'nostr-tools';
17-
import { NDKUserProfile } from '@nostr-dev-kit/ndk-hooks';
1817
import { useNDK } from '@nostr-dev-kit/ndk-hooks';
18+
import { convertNDKUserProfileToSubscriberProfile } from '@app/utils/utils';
1919
import { UserOutlined } from '@ant-design/icons';
2020
import { CreatorButton } from './avatar/SubscriberAvatar.styles';
2121
const { Text } = Typography;
@@ -91,14 +91,7 @@ export const PaidSubscribers: React.FC = () => {
9191
}
9292
}
9393
};
94-
const convertNDKUserProfileToSubscriberProfile = (pubkey: string, user: NDKUserProfile): SubscriberProfile => {
95-
return {
96-
pubkey,
97-
name: user.name || '',
98-
picture: user.picture || '',
99-
about: user.about || '',
100-
};
101-
};
94+
10295
useEffect(() => {
10396
// Fetch profiles for test subscribers
10497
const fetchProfiles = async () => {

0 commit comments

Comments
 (0)