|
@@ -10,7 +10,7 @@ import React, { useState } from "react";
|
|
|
import { Button, Alert, StyleSheet, Text, TextInput, TouchableOpacity, View, Dimensions, Platform, Pressable } from "react-native";
|
|
|
import { QueryStatus } from "react-query";
|
|
|
import { useAuth } from "../../../../data/Auth/AuthContext";
|
|
|
-import { Landmark } from "../../../../data/landmarks";
|
|
|
+import { Landmark, useReportLandmark } from "../../../../data/landmarks";
|
|
|
import { UserProfile } from "../../../../data/profiles";
|
|
|
import { MainTabsNavigationProp } from "../../../../navigation/MainTabsNavigator";
|
|
|
import { Report } from "./Report";
|
|
@@ -48,6 +48,14 @@ export const DetailsHeader: React.FC<DetailsHeaderProps> = (props) => {
|
|
|
props.deletePhotoStatus == "loading"
|
|
|
}
|
|
|
|
|
|
+ // const reportLandmarkMutation = useReportLandmark()
|
|
|
+ // /**
|
|
|
+ // * Calls the {@linkcode rateLandmarkAsunc} mutation from the {@link useLandmarks} hook. If 1, the landmark will be upvoted. If -1, it will be downvoted
|
|
|
+ // */
|
|
|
+ // const reportLandmark = async () => {
|
|
|
+ // await reportLandmarkMutation.mutateAsync();
|
|
|
+ // }
|
|
|
+
|
|
|
const HeaderContent: React.FC = () => {
|
|
|
// landmark is owned by user
|
|
|
if (landmarkOwnedByUser(props.landmark) || (props.profile?.places == props.place)) {
|
|
@@ -139,6 +147,7 @@ export const DetailsHeader: React.FC<DetailsHeaderProps> = (props) => {
|
|
|
</TouchableOpacity>}
|
|
|
<View style={{ flexDirection: 'row' }}>
|
|
|
<Report isLandmark = {true} landmark = {props.landmark} />
|
|
|
+ {/* <Report isLandmark = {true} landmark = {props.landmark} reportLandmark = {reportLandmark}/> */}
|
|
|
<TouchOpaq
|
|
|
func={() => props.removeLandmark()}
|
|
|
size={25}
|