diff --git a/src/additional-components/Background/index.tsx b/src/additional-components/Background/index.tsx index 5209d6b0..dd68fc42 100644 --- a/src/additional-components/Background/index.tsx +++ b/src/additional-components/Background/index.tsx @@ -1,4 +1,4 @@ -import React, { memo, useMemo, HTMLAttributes } from 'react'; +import React, { memo, HTMLAttributes } from 'react'; import cc from 'classcat'; import { useStoreState } from '../../store/hooks'; @@ -34,25 +34,26 @@ const Background = ({ const xOffset = x % scaledGap; const yOffset = y % scaledGap; - const bgSvgTile = useMemo(() => { - const isLines = variant === BackgroundVariant.Lines; - const bgColor = color ? color : defaultColors[variant]; - const path = isLines ? createGridLinesPath(scaledGap, size, bgColor) : createGridDotsPath(size, bgColor); - return encodeURIComponent( - `${path}` - ); - }, [variant, scaledGap, size, color]); + const isLines = variant === BackgroundVariant.Lines; + const bgColor = color ? color : defaultColors[variant]; + const path = isLines ? createGridLinesPath(scaledGap, size, bgColor) : createGridDotsPath(size, bgColor); return ( -
+ > + + {path} + + + + ); }; diff --git a/src/additional-components/Background/utils.ts b/src/additional-components/Background/utils.ts deleted file mode 100644 index c0b6d315..00000000 --- a/src/additional-components/Background/utils.ts +++ /dev/null @@ -1,7 +0,0 @@ -export const createGridLinesPath = (scaledGap: number, strokeWidth: number, stroke: string): string => { - return ``; -}; - -export const createGridDotsPath = (size: number, fill: string): string => { - return ``; -}; diff --git a/src/additional-components/Background/utils.tsx b/src/additional-components/Background/utils.tsx new file mode 100644 index 00000000..d16fdfc8 --- /dev/null +++ b/src/additional-components/Background/utils.tsx @@ -0,0 +1,9 @@ +import React from 'react'; + +export const createGridLinesPath = (size: number, strokeWidth: number, stroke: string): React.ReactElement => { + return ; +}; + +export const createGridDotsPath = (size: number, fill: string): React.ReactElement => { + return ; +};