diff --git a/components/teks/teks-drawer.js b/components/teks/teks-drawer.js index d14c6ac..8480ffa 100644 --- a/components/teks/teks-drawer.js +++ b/components/teks/teks-drawer.js @@ -23,6 +23,8 @@ import MenuIcon from '@material-ui/icons/Menu' import {makeStyles, useTheme} from '@material-ui/core/styles' +import {formatJsonString} from '../../lib/utils/format' + import DrawerBar from './drawer-bar' import DenyeTeks from './denye-teks' import VweKouteAchte from './vwe-koute-achte' @@ -118,10 +120,6 @@ const useStyles = makeStyles(theme => ({ } })) -const formatJsonString = stringToFormat => { - return stringToFormat.split('\n').map((string, index) =>
{`${string}`}
) // eslint-disable-line react/no-array-index-key -} - const langToArray = anTeks => { const langArray = [] diff --git a/lib/utils/format.js b/lib/utils/format.js new file mode 100644 index 0000000..387c8eb --- /dev/null +++ b/lib/utils/format.js @@ -0,0 +1,3 @@ +export const formatJsonString = stringToFormat => { + return stringToFormat.split('\n').map((string, index) =>
{`${string}`}
) // eslint-disable-line react/no-array-index-key +}