Skip to content

Commit

Permalink
fix: deepscan issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mauroerta committed Oct 28, 2021
1 parent cf892be commit 5a50010
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const BorderCard: React.FC<Props> = ({
if (!borderColor || borderColor === 'none') {
return 2;
}
return getContrast(borderColor || ('#000000' as string), '#ffffff');
return getContrast(borderColor, '#ffffff');
}, [borderColor]);

const innerCardStyle = useMemo(() => {
Expand Down
5 changes: 4 additions & 1 deletion devtool/src/_shared/components/Slices/Fonts/Detail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,17 @@ const MAX_LENGTH = 20;

export const Detail: React.FC<Props> = ({ main = 'fonts' }) => {
const { route } = useRouter();
const filteredFontSlices = fontSlices.filter(slice => slice !== main);
const [text, setText] = useState('Lorem ipsum');
const [filtersState, setFiltersState] = useState<Record<FontSlice, string>>(
{} as FiltersState,
);
const { state = {} as RouteState } = route;
const { detailKey } = state;

const filteredFontSlices = useMemo(
() => fontSlices.filter(slice => slice !== main),
[main],
);
const style = {
[propertiesMap[main]]: detailKey,
...filteredFontSlices.reduce((acc, curr) => {
Expand Down

0 comments on commit 5a50010

Please sign in to comment.