From 04aace9b50da757696784837f7f65ab728d2e647 Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Sat, 22 Jul 2023 14:40:21 +0300 Subject: [PATCH] Create util to format SVGs --- src/utils/getFormattedSVG.js | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 src/utils/getFormattedSVG.js diff --git a/src/utils/getFormattedSVG.js b/src/utils/getFormattedSVG.js new file mode 100644 index 00000000..2b90af5c --- /dev/null +++ b/src/utils/getFormattedSVG.js @@ -0,0 +1,2 @@ +export const getFormattedSVG = (svgString) => + "data:image/svg+xml," + encodeURIComponent(svgString);