|
@@ -32,7 +32,6 @@ export interface AddLandmarkProps {
|
|
* The {@link landmark} object to be added.
|
|
* The {@link landmark} object to be added.
|
|
*/
|
|
*/
|
|
newLandmark?: Landmark;
|
|
newLandmark?: Landmark;
|
|
- indoorLmLocImg?: string;
|
|
|
|
/**
|
|
/**
|
|
* The state updater for the new {@link landmark} to be added.
|
|
* The state updater for the new {@link landmark} to be added.
|
|
*/
|
|
*/
|
|
@@ -49,7 +48,7 @@ export interface AddLandmarkProps {
|
|
* @component
|
|
* @component
|
|
* @category Map
|
|
* @category Map
|
|
*/
|
|
*/
|
|
-const AddLandmarkPanel: React.FC<AddLandmarkProps> = ({newLandmark, setNewLandmark, setVisible, visible, indoorLmLocImg}) => {
|
|
|
|
|
|
+const AddLandmarkPanel: React.FC<AddLandmarkProps> = ({newLandmark, setNewLandmark, setVisible, visible}) => {
|
|
const [photos, setPhotos] = useState<LMPhoto[]>([])
|
|
const [photos, setPhotos] = useState<LMPhoto[]>([])
|
|
const [photoSourceMenuOpened, togglePhotoSourceMenu] = useState<boolean>(false)
|
|
const [photoSourceMenuOpened, togglePhotoSourceMenu] = useState<boolean>(false)
|
|
|
|
|
|
@@ -81,7 +80,8 @@ const AddLandmarkPanel: React.FC<AddLandmarkProps> = ({newLandmark, setNewLandma
|
|
* Calls {@link addLandmarkAsync} from {@link useLandmarks} to initate the process of adding a landmark, then closes the modal.
|
|
* Calls {@link addLandmarkAsync} from {@link useLandmarks} to initate the process of adding a landmark, then closes the modal.
|
|
*/
|
|
*/
|
|
const submit = async () => {
|
|
const submit = async () => {
|
|
- await addLandmarkAsync({landmarkValue: newLandmark, photos: photos, indoorLmLocImg: indoorLmLocImg});
|
|
|
|
|
|
+ // create svg content here, then pass it to addLandmarkAsync as the value of indoorLmLocImg
|
|
|
|
+ await addLandmarkAsync({landmarkValue: newLandmark, photos: photos, indoorLmLocImg: undefined }); // pass it in here
|
|
close()
|
|
close()
|
|
}
|
|
}
|
|
|
|
|