Merged in fix/3697-prettier-configs (pull request #3396)
fix(SW-3691): Setup one prettier config for whole repo * Setup prettierrc in root and remove other configs Approved-by: Joakim Jäderberg Approved-by: Linus Flood
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import useSetOverflowVisibleOnRA from '@scandic-hotels/common/hooks/useSetOverflowVisibleOnRA'
|
||||
import { useEffect } from 'react'
|
||||
import useSetOverflowVisibleOnRA from "@scandic-hotels/common/hooks/useSetOverflowVisibleOnRA"
|
||||
import { useEffect } from "react"
|
||||
|
||||
export function KeepBodyVisible() {
|
||||
const toggle = useSetOverflowVisibleOnRA()
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
'use client'
|
||||
"use client"
|
||||
|
||||
import { useEffect } from 'react'
|
||||
import { Dialog, Modal, ModalOverlay } from 'react-aria-components'
|
||||
import { useIntl } from 'react-intl'
|
||||
import { useEffect } from "react"
|
||||
import { Dialog, Modal, ModalOverlay } from "react-aria-components"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import usePopStateHandler from '@scandic-hotels/common/hooks/usePopStateHandler'
|
||||
import usePopStateHandler from "@scandic-hotels/common/hooks/usePopStateHandler"
|
||||
|
||||
import { IconButton } from '../IconButton'
|
||||
import { Typography } from '../Typography'
|
||||
import { IconButton } from "../IconButton"
|
||||
import { Typography } from "../Typography"
|
||||
|
||||
import SidePeekSEO from './SidePeekSEO'
|
||||
import SidePeekSEO from "./SidePeekSEO"
|
||||
|
||||
import { KeepBodyVisible } from './KeepBodyVisible'
|
||||
import styles from './sidePeek.module.css'
|
||||
import { KeepBodyVisible } from "./KeepBodyVisible"
|
||||
import styles from "./sidePeek.module.css"
|
||||
|
||||
interface SidePeekSelfControlledProps extends React.PropsWithChildren {
|
||||
title: string
|
||||
@@ -41,7 +41,7 @@ export default function SidePeekSelfControlled({
|
||||
|
||||
useEffect(() => {
|
||||
if (isOpen) {
|
||||
window.history.pushState(null, '', window.location.href)
|
||||
window.history.pushState(null, "", window.location.href)
|
||||
}
|
||||
}, [isOpen])
|
||||
|
||||
@@ -68,8 +68,8 @@ export default function SidePeekSelfControlled({
|
||||
emphasis
|
||||
onPress={() => handleClose(true)}
|
||||
aria-label={intl.formatMessage({
|
||||
id: 'common.close',
|
||||
defaultMessage: 'Close',
|
||||
id: "common.close",
|
||||
defaultMessage: "Close",
|
||||
})}
|
||||
iconName="close"
|
||||
/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { SidePeekContext } from './index'
|
||||
"use client"
|
||||
import { useEffect, useState } from "react"
|
||||
import { SidePeekContext } from "./index"
|
||||
|
||||
interface SidepeekProviderProps extends React.PropsWithChildren {
|
||||
onOpen?: (sidePeek: string) => void
|
||||
@@ -16,7 +16,7 @@ export default function SidePeekProvider({
|
||||
}: SidepeekProviderProps) {
|
||||
const [activeSidePeek, setActiveSidePeek] = useState<string | null>(null)
|
||||
useEffect(() => {
|
||||
const sidePeekParam = searchParams.get('s')
|
||||
const sidePeekParam = searchParams.get("s")
|
||||
if (sidePeekParam !== activeSidePeek) {
|
||||
setActiveSidePeek(sidePeekParam)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
'use client'
|
||||
import { createContext } from 'react'
|
||||
"use client"
|
||||
import { createContext } from "react"
|
||||
|
||||
interface ISidePeekContext {
|
||||
handleClose: (isOpen: boolean) => void
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
'use client'
|
||||
"use client"
|
||||
|
||||
import { useCallback, useContext, useRef } from 'react'
|
||||
import { Dialog, Modal, ModalOverlay } from 'react-aria-components'
|
||||
import { IconButton } from '../IconButton'
|
||||
import { Typography } from '../Typography'
|
||||
import { useCallback, useContext, useRef } from "react"
|
||||
import { Dialog, Modal, ModalOverlay } from "react-aria-components"
|
||||
import { IconButton } from "../IconButton"
|
||||
import { Typography } from "../Typography"
|
||||
|
||||
import { SidePeekContext } from './SidePeekContext'
|
||||
import { SidePeekContext } from "./SidePeekContext"
|
||||
|
||||
import SidePeekSEO from './SidePeekSEO'
|
||||
import SidePeekSEO from "./SidePeekSEO"
|
||||
|
||||
import { debounce } from '@scandic-hotels/common/utils/debounce'
|
||||
import { KeepBodyVisible } from './KeepBodyVisible'
|
||||
import styles from './sidePeek.module.css'
|
||||
import { debounce } from "@scandic-hotels/common/utils/debounce"
|
||||
import { KeepBodyVisible } from "./KeepBodyVisible"
|
||||
import styles from "./sidePeek.module.css"
|
||||
|
||||
interface SidePeekProps {
|
||||
contentKey?: string
|
||||
@@ -45,7 +45,7 @@ export default function SidePeek({
|
||||
const height = entry.contentRect.height
|
||||
|
||||
dialogRef.current?.style.setProperty(
|
||||
'--sidepeek-header-height',
|
||||
"--sidepeek-header-height",
|
||||
`${height}px`
|
||||
)
|
||||
}, 100)
|
||||
@@ -56,7 +56,7 @@ export default function SidePeek({
|
||||
return () => {
|
||||
observer.unobserve(node)
|
||||
observer.disconnect()
|
||||
dialogRef.current?.style.removeProperty('--sidepeek-header-height')
|
||||
dialogRef.current?.style.removeProperty("--sidepeek-header-height")
|
||||
}
|
||||
}
|
||||
}, [])
|
||||
|
||||
Reference in New Issue
Block a user