Skip to content
Snippets Groups Projects

add new toast

Merged Jørgen Rosager requested to merge feature/toast-ios-android into master
3 files
+ 34
17
Compare changes
  • Side-by-side
  • Inline
Files
3
import * as React from "react";
import { StyleSheet, ToastAndroid } from "react-native";
import { StyleSheet } from "react-native";
import { useSelector } from "react-redux";
import { Rating } from "react-native-elements";
import EditScreenInfo from "../components/EditScreenInfo";
import { Text, View } from "../components/Themed";
import { RootState } from "../store/store";
import { StudentCity } from "../store/studentCities/interfaces";
import { Card, Button } from "react-native-elements";
import { Button } from "react-native-elements";
import Icon from "react-native-vector-icons/FontAwesome5";
import AddRating from "../components/AddRating";
import { useState } from "react";
import Toast from "react-native-simple-toast";
import Toast from "react-native-tiny-toast";
import axios from "axios";
import { API } from "../constants";
import { useActions } from "../hooks/useActions";
@@ -58,19 +55,11 @@ const AddReviewScreen = ({ navigation }) => {
}
};
const showSuccessToast = () => {
/*Toast.showWithGravity(
"Vurderingen din er sendt inn!",
Toast.SHORT,
Toast.TOP
);*/
Toast.showSuccess("Din vurdering har blitt lagt til!");
};
const showErrorToast = (err: String) => {
/*Toast.showWithGravity(
`Vi fikk følgende feilmelding: ${err}`,
Toast.SHORT,
Toast.TOP
);*/
Toast.show(`Error: ${err}`);
};
if (studentCity) {
return (
Loading