search fix + some minor fixes
This commit is contained in:
parent
95bf7ba95a
commit
41cc07e30f
|
@ -65,7 +65,8 @@ export const LoginForm = () => {
|
|||
setIsLinkSent(true)
|
||||
setIsEmailNotConfirmed(false)
|
||||
setSubmitError('')
|
||||
changeSearchParams({ mode: 'forgot-password' }) // NOTE: temporary solition
|
||||
changeSearchParams({ mode: 'forgot-password' })
|
||||
// NOTE: temporary solition, needs logix in authorizer
|
||||
/* FIXME:
|
||||
const { actions: { authorizer } } = useSession()
|
||||
const result = await authorizer().verifyEmail({ token })
|
||||
|
|
|
@ -196,8 +196,7 @@ export const HeaderAuth = (props: Props) => {
|
|||
>
|
||||
<Show when={!isSaveButtonVisible()}>
|
||||
<div class={clsx(styles.userControlItem, styles.userControlItemInbox)}>
|
||||
<a href="/inbox">
|
||||
{/*FIXME: replace with route*/}
|
||||
<a href={getPagePath(router, 'inbox')}>
|
||||
<div classList={{ entered: page().path === '/inbox' }}>
|
||||
<Icon name="inbox-white" class={styles.icon} />
|
||||
<Icon name="inbox-white-hover" class={clsx(styles.icon, styles.iconHover)} />
|
||||
|
|
|
@ -115,15 +115,6 @@ export const AuthorView = (props: Props) => {
|
|||
restoreScrollPosition()
|
||||
}
|
||||
|
||||
// TODO: use title
|
||||
// const title = createMemo(() => {
|
||||
// const m = searchParams().by
|
||||
// if (m === 'viewed') return t('Top viewed')
|
||||
// if (m === 'rating') return t('Top rated')
|
||||
// if (m === 'commented') return t('Top discussed')
|
||||
// return t('Top recent')
|
||||
// })
|
||||
|
||||
const pages = createMemo<Shout[][]>(() =>
|
||||
splitToPages(sortedArticles(), PRERENDERED_ARTICLES_COUNT, LOAD_MORE_PAGE_SIZE),
|
||||
)
|
||||
|
|
|
@ -54,11 +54,6 @@ export const SearchView = (props: Props) => {
|
|||
onMount(async () => {
|
||||
const q = window.location.pathname.replace('/search/', '') || props.query
|
||||
setQuery(q)
|
||||
if (sortedArticles() && !sortedArticles()[0].created_at) {
|
||||
// TODO: fill up articles data structures in search results
|
||||
console.info('[SearchView] poor articles data structure found')
|
||||
await loadMore()
|
||||
}
|
||||
})
|
||||
|
||||
// TODO: use score from the search results to sort by relevance
|
||||
|
|
|
@ -56,7 +56,7 @@ export const InboxProvider = (props: { children: JSX.Element }) => {
|
|||
): Promise<Array<Message>> => {
|
||||
if (inboxClient.private) {
|
||||
const msgs = await inboxClient.loadChatMessages({ by, limit, offset })
|
||||
setMessages((mmm) => [...mmm, ...msgs]) // TODO: check unique
|
||||
setMessages((mmm) => [...new Set([...mmm, ...msgs])])
|
||||
return msgs || []
|
||||
}
|
||||
return []
|
||||
|
|
|
@ -60,15 +60,7 @@ export const showModal = (modalType: ModalType, modalSource?: AuthModalSource) =
|
|||
setModal(modalType)
|
||||
}
|
||||
|
||||
// TODO: find a better solution
|
||||
export const hideModal = () => {
|
||||
const newSearchParams: Partial<AuthModalSearchParams & ConfirmEmailSearchParams & RootSearchParams> = {
|
||||
modal: null,
|
||||
source: null,
|
||||
}
|
||||
|
||||
setModal(null)
|
||||
}
|
||||
export const hideModal = () => setModal(null)
|
||||
|
||||
export const useModalStore = () => {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue
Block a user