Added name capitalization to token and map upload

This commit is contained in:
Mitchell McCaffrey
2020-10-09 13:10:30 +11:00
parent 9314e0c609
commit f851b01f47
2 changed files with 6 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
import React, { useRef, useState, useContext } from "react";
import { Button, Flex, Label } from "theme-ui";
import shortid from "shortid";
import Case from "case";
import EditMapModal from "./EditMapModal";
import EditGroupModal from "./EditGroupModal";
@@ -139,6 +140,8 @@ function SelectMapModal({
// Clean string
name = name.replace(/ +/g, " ");
name = name.trim();
// Capitalize and remove underscores
name = Case.capital(name);
}
// Create resolutions