Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
c912f3d6
Commit
c912f3d6
authored
Jan 12, 2023
by
Lyza Danger Gardner
Committed by
Lyza Gardner
Jan 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert StreamView to TS
parent
69f1ca28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
StreamView.tsx
src/sidebar/components/StreamView.tsx
+9
-10
No files found.
src/sidebar/components/StreamView.
js
→
src/sidebar/components/StreamView.
tsx
View file @
c912f3d6
...
...
@@ -2,23 +2,23 @@ import { useCallback, useEffect } from 'preact/hooks';
import
*
as
searchFilter
from
'../util/search-filter'
;
import
{
withServices
}
from
'../service-context'
;
import
type
{
APIService
}
from
'../services/api'
;
import
type
{
ToastMessengerService
}
from
'../services/toast-messenger'
;
import
{
useRootThread
}
from
'./hooks/use-root-thread'
;
import
{
useSidebarStore
}
from
'../store'
;
import
ThreadList
from
'./ThreadList'
;
/**
* @typedef StreamViewProps
* @prop {import('../services/api').APIService} api
* @prop {import('../services/toast-messenger').ToastMessengerService} toastMessenger
*/
export
type
StreamViewProps
=
{
// injected
api
:
APIService
;
toastMessenger
:
ToastMessengerService
;
};
/**
* The main content of the "stream" route (https://hypothes.is/stream)
*
* @param {StreamViewProps} props
*/
function
StreamView
({
api
,
toastMessenger
})
{
function
StreamView
({
api
,
toastMessenger
}
:
StreamViewProps
)
{
const
store
=
useSidebarStore
();
const
currentQuery
=
store
.
routeParams
().
q
;
...
...
@@ -26,8 +26,7 @@ function StreamView({ api, toastMessenger }) {
* Fetch annotations from the API and display them in the stream.
*/
const
loadAnnotations
=
useCallback
(
/** @param {string} query */
async
query
=>
{
async
(
query
:
string
)
=>
{
const
queryParams
=
{
_separate_replies
:
true
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment