header-hotfix

This commit is contained in:
Untone 2024-05-07 01:15:57 +03:00
parent 52ef17dc6d
commit 8ea55b3632
3 changed files with 7 additions and 9 deletions

View File

@ -335,7 +335,7 @@ export const Header = (props: Props) => {
<Show when={props.title}>
<div
class={clsx(styles.articleControls, 'col-auto', {
// FIXME: use or remove [styles.articleControlsAuthorized]: session()?.user?.id,
[styles.articleControlsAuthorized]: session()?.user?.id,
})}
>
<SharePopup

View File

@ -34,7 +34,7 @@ export const HeaderAuth = (props: Props) => {
const { page } = useRouter()
const { session, author, isSessionLoaded } = useSession()
const { unreadNotificationsCount, showNotificationsPanel } = useNotifications()
const { form, toggleEditorPanel, saveShout, publishShout } = useEditorContext()
const { form, toggleEditorPanel, publishShout } = useEditorContext()
const handleBellIconClick = (event: Event) => {
event.preventDefault()
@ -59,10 +59,6 @@ export const HeaderAuth = (props: Props) => {
toggleEditorPanel()
}
const handleSaveButtonClick = () => {
saveShout(form)
}
const [width, setWidth] = createSignal(0)
const [editorMode, setEditorMode] = createSignal(t('Editing'))

View File

@ -21,9 +21,11 @@ export const ArticleCardSwiper = (props: Props) => {
const mainSwipeRef: { current: SwiperRef } = { current: null }
onMount(async () => {
const { register } = await import('swiper/element/bundle')
register()
SwiperCore.use([Pagination, Navigation, Manipulation])
if (props.slides.length > 1) {
const { register } = await import('swiper/element/bundle')
register()
SwiperCore.use([Pagination, Navigation, Manipulation])
}
})
return (