-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Link Payloads in feed composer (#189)
* fix image postioning * allow link preview uploads * memoised to avoid multiple re renders * update deps * websockets upgradation to get event updates from all channel and post drives * fix too much re rendering * cleanups * convert to 1 hour * cleanups * remove logs * final * fix bad audio cache fetching * conversation page animated list on new conversation
- Loading branch information
1 parent
eeade72
commit 63e9b7c
Showing
17 changed files
with
294 additions
and
155 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,23 @@ | ||
import { getDrivesByType } from '@homebase-id/js-lib/core'; | ||
import { BlogConfig } from '@homebase-id/js-lib/public'; | ||
import { useQuery } from '@tanstack/react-query'; | ||
import { useDotYouClientContext } from 'feed-app-common'; | ||
import { ChatDrive } from '../../provider/chat/ConversationProvider'; | ||
|
||
const PAGE_SIZE = 100; | ||
|
||
export const useDriveSubscriber = () => { | ||
const dotyouClient = useDotYouClientContext(); | ||
const fetchPostsDrives = async () => { | ||
const pagedDrives = await getDrivesByType(dotyouClient, BlogConfig.DriveType, 1, PAGE_SIZE); | ||
return pagedDrives.results.map((drive) => drive.targetDriveInfo); | ||
}; | ||
return useQuery({ | ||
queryKey: ['drive-subscriber'], | ||
select: (data) => [ChatDrive, BlogConfig.FeedDrive, BlogConfig.PublicChannelDrive, ...data], | ||
queryFn: fetchPostsDrives, | ||
refetchOnMount: false, | ||
refetchOnWindowFocus: true, | ||
staleTime: 1000 * 60 * 60, | ||
}); | ||
}; |
Oops, something went wrong.