Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Eitan Elbaz authored and Eitan Elbaz committed Nov 21, 2023
1 parent 8f0fac4 commit 8fd4926
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/components/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
ComponentVisibility,
ReactGrandTourProps,
} from '../types';
import CloseButton from './CloseButton';
import { isSafari } from '../lib';
import CloseButtonPositionalWrapper from './CloseButtonPositionalWrapper';

Expand Down
12 changes: 6 additions & 6 deletions src/lib/getArrowDirection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ const getArrowDirection = ({ top, left, height, width }: DOMRect): ArrowDirectio
top < -height
? 'up'
: top > window.innerHeight - 10
? 'down'
: left > window.innerWidth - 10
? 'right'
: left < -width
? 'left'
: null;
? 'down'
: left > window.innerWidth - 10
? 'right'
: left < -width
? 'left'
: null;

export default getArrowDirection;
2 changes: 1 addition & 1 deletion src/lib/isSafari.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const isSafari =
typeof navigator != 'undefined'
typeof navigator !== 'undefined'
? /^((?!chrome|android).)*safari/i.test(navigator.userAgent)
: false;

Expand Down
2 changes: 1 addition & 1 deletion src/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const getProps = (obj: Record<string, any>, selector: string) =>
export const styleObjectToCssStyleString = (obj: Record<string, any>) =>
Object.entries(obj).reduce((acc, [key, val]) => {
const props = getProps(val, key);
return `${acc}${key}{${props}${props[props.length - 1] != '}' ? '}' : ''}`;
return `${acc}${key}{${props}${props[props.length - 1] !== '}' ? '}' : ''}`;
}, '');

// https://coolors.co/5fad56-f2c14e-f78154-4d9078-b4436c
Expand Down

0 comments on commit 8fd4926

Please sign in to comment.