renamed model follow to pleb
This commit is contained in:
@@ -28,12 +28,12 @@ export const ActiveAccount = memo(function ActiveAccount({ user }: { user: any }
|
||||
|
||||
const insertFollowsToStorage = useCallback(
|
||||
async (tags) => {
|
||||
const { createFollow } = await import('@utils/bindings');
|
||||
const { createPleb } = await import('@utils/bindings');
|
||||
const activeAccount = JSON.parse(localStorage.getItem('activeAccount'));
|
||||
|
||||
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: activeAccount.id }).catch(
|
||||
createPleb({ pubkey: tag[1], kind: 0, metadata: metadata.content, account_id: activeAccount.id }).catch(
|
||||
console.error
|
||||
);
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ export const UserExtend = ({ pubkey, time }: { pubkey: string; time: number }) =
|
||||
}, []);
|
||||
|
||||
const getCachedMetadata = useCallback(async () => {
|
||||
const { getFollowByPubkey } = await import('@utils/bindings');
|
||||
getFollowByPubkey({ pubkey: pubkey })
|
||||
const { getPlebByPubkey } = await import('@utils/bindings');
|
||||
getPlebByPubkey({ pubkey: pubkey })
|
||||
.then((res) => {
|
||||
if (res) {
|
||||
const metadata = JSON.parse(res.metadata);
|
||||
|
||||
@@ -10,8 +10,8 @@ export const UserFollow = ({ pubkey }: { pubkey: string }) => {
|
||||
const [profile, setProfile] = useState(null);
|
||||
|
||||
const getCachedMetadata = useCallback(async () => {
|
||||
const { getFollowByPubkey } = await import('@utils/bindings');
|
||||
getFollowByPubkey({ pubkey: pubkey })
|
||||
const { getPlebByPubkey } = await import('@utils/bindings');
|
||||
getPlebByPubkey({ pubkey: pubkey })
|
||||
.then((res) => {
|
||||
if (res) {
|
||||
const metadata = JSON.parse(res.metadata);
|
||||
|
||||
@@ -15,8 +15,8 @@ export const UserLarge = ({ pubkey, time }: { pubkey: string; time: number }) =>
|
||||
const [profile, setProfile] = useState(null);
|
||||
|
||||
const getCachedMetadata = useCallback(async () => {
|
||||
const { getFollowByPubkey } = await import('@utils/bindings');
|
||||
getFollowByPubkey({ pubkey: pubkey })
|
||||
const { getPlebByPubkey } = await import('@utils/bindings');
|
||||
getPlebByPubkey({ pubkey: pubkey })
|
||||
.then((res) => {
|
||||
if (res) {
|
||||
const metadata = JSON.parse(res.metadata);
|
||||
|
||||
@@ -15,8 +15,8 @@ export const UserMention = memo(function UserMention({ pubkey }: { pubkey: strin
|
||||
}, []);
|
||||
|
||||
const getCachedMetadata = useCallback(async () => {
|
||||
const { getFollowByPubkey } = await import('@utils/bindings');
|
||||
getFollowByPubkey({ pubkey: pubkey })
|
||||
const { getPlebByPubkey } = await import('@utils/bindings');
|
||||
getPlebByPubkey({ pubkey: pubkey })
|
||||
.then((res) => {
|
||||
if (res) {
|
||||
const metadata = JSON.parse(res.metadata);
|
||||
|
||||
@@ -10,8 +10,8 @@ export const UserMini = ({ pubkey }: { pubkey: string }) => {
|
||||
const [profile, setProfile] = useState(null);
|
||||
|
||||
const getCachedMetadata = useCallback(async () => {
|
||||
const { getFollowByPubkey } = await import('@utils/bindings');
|
||||
getFollowByPubkey({ pubkey: pubkey })
|
||||
const { getPlebByPubkey } = await import('@utils/bindings');
|
||||
getPlebByPubkey({ pubkey: pubkey })
|
||||
.then((res) => {
|
||||
if (res) {
|
||||
const metadata = JSON.parse(res.metadata);
|
||||
|
||||
Reference in New Issue
Block a user