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}> <Show when={props.title}>
<div <div
class={clsx(styles.articleControls, 'col-auto', { class={clsx(styles.articleControls, 'col-auto', {
// FIXME: use or remove [styles.articleControlsAuthorized]: session()?.user?.id, [styles.articleControlsAuthorized]: session()?.user?.id,
})} })}
> >
<SharePopup <SharePopup

View File

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

View File

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