Skip to content

Commit

Permalink
fix: fix OwnedByAddress
Browse files Browse the repository at this point in the history
friendlysxw committed Nov 10, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 9f76662 commit 82cd0d3
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions apps/u3/src/container/social/Social.tsx
Original file line number Diff line number Diff line change
@@ -24,15 +24,16 @@ import {
PostList,
} from './CommonStyles';
import { useLensCtx } from '../../contexts/social/AppLensCtx';
import { getOwnedByAddress } from '../../utils/social/lens/profile';

export default function SocialAll() {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [parentId, setParentId] = useState('social-all');
const { isLogin } = useLogin();
const { sessionProfile: lensSessionProfile } = useLensCtx();
const fid = useFarcasterCurrFid();
const { ownedBy: lensProfileOwnedByAddress, id: lensSessionProfileId } =
lensSessionProfile || {};
const { id: lensSessionProfileId } = lensSessionProfile || {};
const lensProfileOwnedByAddress = getOwnedByAddress(lensSessionProfile);

const {
socialPlatform,
4 changes: 2 additions & 2 deletions apps/u3/src/container/social/SocialLayout.tsx
Original file line number Diff line number Diff line change
@@ -25,14 +25,14 @@ import SearchInput from '../../components/common/input/SearchInput';
import { useFarcasterCtx } from '../../contexts/social/FarcasterCtx';
import TrendChannel from '../../components/social/farcaster/TrendChannel';
import { useLensCtx } from '../../contexts/social/AppLensCtx';
import { getOwnedByAddress } from '../../utils/social/lens/profile';

export default function SocialLayout() {
const location = useLocation();
const { isConnected: isConnectedFarcaster } = useFarcasterCtx();
const { sessionProfile: lensSessionProfile } = useLensCtx();
const { loading: lensSessionLoading } = useSession();
const { ownedBy: lensProfileOwnedBy } = lensSessionProfile || {};
const { address: lensProfileOwnedByAddress } = lensProfileOwnedBy || {};
const lensProfileOwnedByAddress = getOwnedByAddress(lensSessionProfile);

const [postScroll, setPostScroll] = useState({
currentParent: '',
5 changes: 3 additions & 2 deletions apps/u3/src/container/social/SocialLens.tsx
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ import {
PostList,
} from './CommonStyles';
import { useLensCtx } from '../../contexts/social/AppLensCtx';
import { getOwnedByAddress } from '../../utils/social/lens/profile';

export default function SocialFarcaster() {
const [parentId] = useState('social-lens');
@@ -52,8 +53,8 @@ export default function SocialFarcaster() {
const { feeds, firstLoading, pageInfo, moreLoading } = useListFeeds(parentId);

const { sessionProfile } = useLensCtx();
const { ownedBy: lensProfileOwnedByAddress, id: lensSessionProfileId } =
sessionProfile || {};
const { id: lensSessionProfileId } = sessionProfile || {};
const lensProfileOwnedByAddress = getOwnedByAddress(sessionProfile);

const loadFirstFeeds = useCallback(async () => {
setFirstLoadingDone(false);

0 comments on commit 82cd0d3

Please sign in to comment.