scrollToComments(event, true)} class={styles.control}>
+
changeSearchParams({ commentId: 0 })} class={styles.control}>
diff --git a/src/components/SearchModal/SearchModal.module.scss b/src/components/SearchModal/SearchModal.module.scss
index ddfc00eb..a35c919c 100644
--- a/src/components/SearchModal/SearchModal.module.scss
+++ b/src/components/SearchModal/SearchModal.module.scss
@@ -1,4 +1,6 @@
@mixin search-filter-control {
+ @include font-size(1.4rem);
+
height: 4rem;
padding: 0 2rem;
background: rgb(64 64 64 / 50%);
@@ -7,8 +9,6 @@
font-weight: 500;
white-space: nowrap;
- @include font-size(1.4rem);
-
&:hover {
background: #404040;
}
@@ -23,6 +23,8 @@
}
.searchInput {
+ @include font-size(4.8rem);
+
width: 100%;
padding: 0 0 0.5rem;
background: none;
@@ -32,8 +34,6 @@
font-weight: bold;
outline: none;
- @include font-size(4.8rem);
-
&::placeholder {
color: rgb(255 255 255 / 32%);
}
@@ -60,10 +60,10 @@
}
.searchDescription {
+ @include font-size(1.6rem);
+
margin-bottom: 44px;
color: rgb(255 255 255 / 64%);
-
- @include font-size(1.6rem);
}
.topicsList {
diff --git a/src/components/Topic/Full.tsx b/src/components/Topic/Full.tsx
index 9ec7ad38..910de6f7 100644
--- a/src/components/Topic/Full.tsx
+++ b/src/components/Topic/Full.tsx
@@ -44,7 +44,7 @@ export const FullTopic = (props: Props) => {
)
createEffect(() => {
- if (follows?.topics?.length !== 0) {
+ if (follows?.topics?.length ?? true) {
const items = follows.topics || []
setFollowed(items.some((x: Topic) => x?.slug === props.topic?.slug))
}
diff --git a/src/components/TopicsNav/TopicsNav.tsx b/src/components/TopicsNav/TopicsNav.tsx
index 094beac9..b0818bb4 100644
--- a/src/components/TopicsNav/TopicsNav.tsx
+++ b/src/components/TopicsNav/TopicsNav.tsx
@@ -17,7 +17,7 @@ export const RandomTopics = () => {
const [randomTopics, setRandomTopics] = createSignal
([])
createEffect(
on(sortedTopics, (ttt: Topic[]) => {
- if (ttt?.length) {
+ if (ttt?.length > 0) {
setRandomTopics(getRandomItemsFromArray(ttt))
}
})
diff --git a/src/components/Views/AllAuthors/AllAuthors.tsx b/src/components/Views/AllAuthors/AllAuthors.tsx
index d32dc0d9..64462ae3 100644
--- a/src/components/Views/AllAuthors/AllAuthors.tsx
+++ b/src/components/Views/AllAuthors/AllAuthors.tsx
@@ -56,7 +56,7 @@ export const AllAuthors = (props: Props) => {
// store by first char
const byLetterFiltered = createMemo<{ [letter: string]: Author[] }>(() => {
- if (!(filteredAuthors()?.length > 0)) return {}
+ if (!filteredAuthors()) return {}
console.debug('[components.AllAuthors] update byLetterFiltered', filteredAuthors()?.length)
return (
filteredAuthors()?.reduce(
diff --git a/src/components/Views/Author/Author.tsx b/src/components/Views/Author/Author.tsx
index b534aa44..1deaa13b 100644
--- a/src/components/Views/Author/Author.tsx
+++ b/src/components/Views/Author/Author.tsx
@@ -175,7 +175,7 @@ export const AuthorView = (props: AuthorViewProps) => {
const [loadMoreCommentsHidden, setLoadMoreCommentsHidden] = createSignal(
Boolean(props.author?.stat && props.author?.stat?.comments === 0)
)
- const { commentsByAuthor, addReactions } = useReactions()
+ const { commentsByAuthor, addShoutReactions } = useReactions()
const loadMoreComments = async () => {
if (!author()) return [] as LoadMoreItems
saveScrollPosition()
@@ -189,7 +189,7 @@ export const AuthorView = (props: AuthorViewProps) => {
offset: commentsByAuthor()[aid]?.length || 0
})
const result = await authorCommentsFetcher()
- result && addReactions(result)
+ result && addShoutReactions(result)
restoreScrollPosition()
return result as LoadMoreItems
}
diff --git a/src/components/Views/ConnectView.tsx b/src/components/Views/ConnectView.tsx
index 3aec4e40..0ed0a5af 100644
--- a/src/components/Views/ConnectView.tsx
+++ b/src/components/Views/ConnectView.tsx
@@ -1,5 +1,4 @@
-import { createSignal } from 'solid-js'
-import { Show } from 'solid-js/web'
+import { Show, createSignal } from 'solid-js'
import { useLocalize } from '~/context/localize'
export const ConnectView = () => {
diff --git a/src/components/Views/EditView/EditView.tsx b/src/components/Views/EditView/EditView.tsx
index 151f732b..12811287 100644
--- a/src/components/Views/EditView/EditView.tsx
+++ b/src/components/Views/EditView/EditView.tsx
@@ -130,7 +130,7 @@ export const EditView = (props: Props) => {
draft,
(d) => {
if (d) {
- const draftForm = Object.keys(d).length !== 0 ? d : { shoutId: props.shout.id }
+ const draftForm = Object.keys(d) ? d : { shoutId: props.shout.id }
setForm(draftForm)
console.debug('draft from localstorage: ', draftForm)
}
diff --git a/src/components/Views/Feed/Feed.tsx b/src/components/Views/Feed/Feed.tsx
index 42d30bc6..cbb2a7e5 100644
--- a/src/components/Views/Feed/Feed.tsx
+++ b/src/components/Views/Feed/Feed.tsx
@@ -118,7 +118,7 @@ export const FeedView = (props: FeedProps) => {
-
+
-
diff --git a/src/components/Views/Profile/ProfileSettings.tsx b/src/components/Views/Profile/ProfileSettings.tsx
index e5f7715f..0c522fac 100644
--- a/src/components/Views/Profile/ProfileSettings.tsx
+++ b/src/components/Views/Profile/ProfileSettings.tsx
@@ -14,6 +14,7 @@ import {
onMount
} from 'solid-js'
import { createStore } from 'solid-js/store'
+import SimplifiedEditor from '~/components/Editor/SimplifiedEditor'
import { useLocalize } from '~/context/localize'
import { useProfile } from '~/context/profile'
import { useSession } from '~/context/session'
@@ -34,7 +35,7 @@ import { SocialNetworkInput } from '../../_shared/SocialNetworkInput'
import styles from './Settings.module.scss'
import { profileSocialLinks } from './profileSocialLinks'
-const SimplifiedEditor = lazy(() => import('~/components/Editor/SimplifiedEditor'))
+// const SimplifiedEditor = lazy(() => import('~/components/Editor/SimplifiedEditor'))
const GrowingTextarea = lazy(() => import('~/components/_shared/GrowingTextarea/GrowingTextarea'))
function filterNulls(arr: InputMaybe[]): string[] {
@@ -56,11 +57,11 @@ export const ProfileSettings = () => {
const [slugError, setSlugError] = createSignal()
const [nameError, setNameError] = createSignal()
const { form, submit, updateFormField, setForm } = useProfile()
+ const [about, setAbout] = createSignal(form.about)
const { showSnackbar } = useSnackbar()
const { loadSession, session } = useSession()
const [prevForm, setPrevForm] = createStore()
const { showConfirm } = useUI()
- const [clearAbout, setClearAbout] = createSignal(false)
const { showModal, hideModal } = useUI()
const [loading, setLoading] = createSignal(true)
@@ -111,6 +112,7 @@ export const ProfileSettings = () => {
try {
await submit(form)
setPrevForm(clone(form))
+ setAbout(form.about)
showSnackbar({ body: t('Profile successfully saved') })
} catch (error) {
if (error?.toString().search('duplicate_slug')) {
@@ -132,11 +134,7 @@ export const ProfileSettings = () => {
confirmButtonVariant: 'primary',
declineButtonVariant: 'secondary'
})
- if (isConfirmed) {
- setClearAbout(true)
- setForm(clone(prevForm))
- setClearAbout(false)
- }
+ isConfirmed && setForm(clone(prevForm))
}
const handleCropAvatar = () => {
@@ -254,7 +252,7 @@ export const ProfileSettings = () => {
{/* @@TODO inspect popover below. onClick causes page refreshing */}
- {/*
+
{(triggerRef: (el: HTMLElement) => void) => (
)}
- */}
+
@@ -284,18 +282,20 @@ export const ProfileSettings = () => {
)}