renamed model follow to pleb
This commit is contained in:
@@ -19,8 +19,8 @@ export default function Page() {
|
||||
}, []);
|
||||
|
||||
const fetchFollowsByAccount = useCallback(async (id) => {
|
||||
const { getFollows } = await import('@utils/bindings');
|
||||
return await getFollows({ account_id: id });
|
||||
const { getPlebs } = await import('@utils/bindings');
|
||||
return await getPlebs({ account_id: id });
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -80,12 +80,12 @@ export default function Page() {
|
||||
|
||||
// save follows to database then broadcast
|
||||
const submit = useCallback(async () => {
|
||||
const { createFollow } = await import('@utils/bindings');
|
||||
const { createPleb } = await import('@utils/bindings');
|
||||
setLoading(true);
|
||||
|
||||
for (const follow of follows) {
|
||||
const metadata: any = await fetchMetadata(follow, pool, relays);
|
||||
createFollow({ pubkey: follow, kind: 0, metadata: metadata.content, account_id: parseInt(id) }).catch(
|
||||
createPleb({ pubkey: follow, kind: 0, metadata: metadata.content, account_id: parseInt(id) }).catch(
|
||||
console.error
|
||||
);
|
||||
}
|
||||
|
||||
@@ -46,11 +46,11 @@ export default function Page() {
|
||||
|
||||
const insertFollowsToStorage = useCallback(
|
||||
async (tags) => {
|
||||
const { createFollow } = await import('@utils/bindings');
|
||||
const { createPleb } = await import('@utils/bindings');
|
||||
if (profile?.id !== null) {
|
||||
for (const tag of tags) {
|
||||
const metadata: any = await fetchMetadata(tag[1], pool, relays);
|
||||
createFollow({ pubkey: tag[1], kind: 0, metadata: metadata.content, account_id: profile.id }).catch(
|
||||
createPleb({ pubkey: tag[1], kind: 0, metadata: metadata.content, account_id: profile.id }).catch(
|
||||
console.error
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user