Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Триггер для апгрейда версии swiper #479

Merged
merged 1 commit into from
Aug 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file added .yarn/cache/fsevents-patch-19706e7e35-9.zip
Binary file not shown.
4 changes: 1 addition & 3 deletions ui-parts/swiper/src/swiper-instance-exporter.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { useSwiper } from 'swiper/react'

const SwiperInstanceExporter = ({ swiper, setSwiper }) => {
export const SwiperInstanceExporter = ({ swiper, setSwiper }) => {
const swiperInstance = useSwiper()

if (!swiper) setSwiper(swiperInstance)

return null
}

export { SwiperInstanceExporter }
9 changes: 4 additions & 5 deletions ui-parts/swiper/src/swiper.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { injectGlobal } from '@emotion/css'

import { nanoid } from 'nanoid'
import React from 'react'
import { FC } from 'react'
import { useMemo } from 'react'
import { Swiper as BaseSwiper } from 'swiper/react'
import { SwiperProps } from 'swiper/react'
import { nanoid } from 'nanoid'
import { useMemo } from 'react'

import { STYLES } from './swiper.styles'
import { STYLES } from './swiper.styles'

let wasGloballyInjected = false
const injectedClasses: Array<string> = []
const injectedClasses: string[] = []

const Swiper: FC<SwiperProps> = ({ width, className, ...props }) => {
// eslint-disable-next-line
Expand Down
Loading