-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'lens-v2' into v2/bookmark-toggle
- Loading branch information
Showing
87 changed files
with
1,681 additions
and
579 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@lens-protocol/api-bindings": minor | ||
"@lens-protocol/react": minor | ||
"@lens-protocol/react-web": minor | ||
--- | ||
|
||
adds publication bookmarks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@lens-protocol/react": minor | ||
"@lens-protocol/react-web": minor | ||
--- | ||
|
||
**feat:** implements `useLogout` hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"@lens-protocol/api-bindings": patch | ||
"@lens-protocol/domain": patch | ||
"@lens-protocol/react": patch | ||
--- | ||
|
||
Rename useFollowProfile to useFollow | ||
Rename useUnfollowProfile to useUnfollow | ||
Add support for LensProfileManager to useFollow, useUnfollow and useUpdateFollowPolicy hooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@lens-protocol/gated-content": patch | ||
"@lens-protocol/api-bindings": patch | ||
"@lens-protocol/client": patch | ||
"@lens-protocol/react": patch | ||
--- | ||
|
||
Updated to support the latest API schema |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import { Link } from 'react-router-dom'; | ||
|
||
// TODO render log out button once useSession is implemented | ||
export function LoginButton() { | ||
return <Link to="/login">Log in</Link>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { useLogout } from '@lens-protocol/react-web'; | ||
|
||
export function LogoutButton() { | ||
const { execute: logout } = useLogout(); | ||
return ( | ||
<a href="javascript:false" onClick={() => logout()}> | ||
Log out | ||
</a> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export * from './LoginButton'; | ||
export * from './LogoutButton'; | ||
export * from './WhenLoggedIn'; | ||
export * from './WhenLoggedOut'; | ||
export * from './UnauthenticatedFallback'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { useMyBookmarks } from '@lens-protocol/react-web'; | ||
|
||
import { UnauthenticatedFallback, WhenLoggedIn } from '../components/auth'; | ||
import { ErrorMessage } from '../components/error/ErrorMessage'; | ||
import { Loading } from '../components/loading/Loading'; | ||
import { useInfiniteScroll } from '../hooks/useInfiniteScroll'; | ||
import { PublicationCard } from './components/PublicationCard'; | ||
|
||
export function MyBookmarks() { | ||
const { | ||
data: publications, | ||
error, | ||
loading, | ||
hasMore, | ||
observeRef, | ||
} = useInfiniteScroll(useMyBookmarks()); | ||
|
||
if (loading) return <Loading />; | ||
|
||
if (error) return <ErrorMessage error={error} />; | ||
|
||
if (publications.length === 0) return <p>No bookmarks yet.</p>; | ||
|
||
return ( | ||
<div> | ||
{publications.map((publication) => ( | ||
<PublicationCard key={publication.id} publication={publication} /> | ||
))} | ||
{hasMore && <p ref={observeRef}>Loading more...</p>} | ||
</div> | ||
); | ||
} | ||
|
||
export function UseMyBookmarks() { | ||
return ( | ||
<div> | ||
<h1> | ||
<code>useMyBookmarks</code> | ||
</h1> | ||
|
||
<WhenLoggedIn>{() => <MyBookmarks />}</WhenLoggedIn> | ||
<UnauthenticatedFallback message="Log in to run this demo." /> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.