Added unknown token for when a token in use is deleted

This commit is contained in:
Mitchell McCaffrey
2020-05-20 11:35:14 +10:00
parent 887bce81d1
commit 3f959fd3a3
12 changed files with 47 additions and 17 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import ResetMapIcon from "../../icons/ResetMapIcon";
import ExpandMoreDotIcon from "../../icons/ExpandMoreDotIcon";
import useDataSource from "../../helpers/useDataSource";
import { mapSources as defaultMapSources } from "../../maps";
import { mapSources as defaultMapSources, unknownSource } from "../../maps";
function MapTile({
map,
@@ -17,7 +17,7 @@ function MapTile({
onMapReset,
onDone,
}) {
const mapSource = useDataSource(map, defaultMapSources);
const mapSource = useDataSource(map, defaultMapSources, unknownSource);
const [isMapTileMenuOpen, setIsTileMenuOpen] = useState(false);
const isDefault = map.type === "default";
const hasMapState =
+2 -2
View File
@@ -9,11 +9,11 @@ import useDataSource from "../../helpers/useDataSource";
import AuthContext from "../../contexts/AuthContext";
import { tokenSources } from "../../tokens";
import { tokenSources, unknownSource } from "../../tokens";
function MapToken({ token, tokenState, tokenSizePercent, className }) {
const { userId } = useContext(AuthContext);
const imageSource = useDataSource(token, tokenSources);
const imageSource = useDataSource(token, tokenSources, unknownSource);
const imageRef = useRef();
// Stop touch to prevent 3d touch gesutre on iOS