File tree Expand file tree Collapse file tree 3 files changed +27
-2
lines changed
Expand file tree Collapse file tree 3 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 1- import React , { useState } from 'react'
1+ import React , { useState , useEffect } from 'react'
22import { motion } from 'framer-motion'
33
44interface Props {
@@ -16,6 +16,18 @@ export const AnalysisConfigModal: React.FC<Props> = ({
1616} ) => {
1717 const [ selectedDepth , setSelectedDepth ] = useState ( initialDepth )
1818
19+ useEffect ( ( ) => {
20+ if ( isOpen ) {
21+ document . body . style . overflow = 'hidden'
22+ } else {
23+ document . body . style . overflow = 'unset'
24+ }
25+
26+ return ( ) => {
27+ document . body . style . overflow = 'unset'
28+ }
29+ } , [ isOpen ] )
30+
1931 const depthOptions = [
2032 {
2133 value : 12 ,
Original file line number Diff line number Diff line change 1- import React from 'react'
1+ import React , { useEffect } from 'react'
22import { motion } from 'framer-motion'
33import { GameAnalysisProgress } from 'src/hooks/useAnalysisController/useAnalysisController'
44
@@ -16,6 +16,18 @@ export const AnalysisProgressOverlay: React.FC<Props> = ({
1616 ? Math . round ( ( progress . currentMoveIndex / progress . totalMoves ) * 100 )
1717 : 0
1818
19+ useEffect ( ( ) => {
20+ if ( progress . isAnalyzing ) {
21+ document . body . style . overflow = 'hidden'
22+ } else {
23+ document . body . style . overflow = 'unset'
24+ }
25+
26+ return ( ) => {
27+ document . body . style . overflow = 'unset'
28+ }
29+ } , [ progress . isAnalyzing ] )
30+
1931 if ( ! progress . isAnalyzing ) return null
2032
2133 return (
Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ const Profile: React.FC<Props> = (props: Props) => {
157157 < div className = "flex flex-col" >
158158 < h1 className = "text-3xl font-semibold" > { props . name } </ h1 >
159159 < a
160+ target = "_blank"
160161 href = { `https://lichess.org/@/${ props . name } ` }
161162 className = "text-sm text-primary"
162163 >
You can’t perform that action at this time.
0 commit comments