Merge branch 'develop' of https://github.com/CloudAlb/tcc-vamos-frontend into feature/VAN-16-view-create-itinerary
This commit is contained in:
@@ -1,23 +1,18 @@
|
||||
import {
|
||||
IonBackButton,
|
||||
IonBadge,
|
||||
IonButtons,
|
||||
IonCard,
|
||||
IonCardContent,
|
||||
IonCardHeader,
|
||||
IonCardTitle,
|
||||
IonChip,
|
||||
IonContent,
|
||||
IonHeader,
|
||||
IonIcon,
|
||||
IonItem,
|
||||
IonLabel,
|
||||
IonList,
|
||||
IonListHeader,
|
||||
IonPage,
|
||||
IonTitle,
|
||||
IonToast,
|
||||
IonToolbar,
|
||||
} from "@ionic/react";
|
||||
import {
|
||||
callOutline,
|
||||
@@ -38,11 +33,13 @@ import "./Perfil.css";
|
||||
|
||||
import { Color } from "@ionic/core";
|
||||
import { UserContext } from "../App";
|
||||
import { PageHeader } from "../components/PageHeader";
|
||||
import sessionsService from "../services/functions/sessionsService";
|
||||
import {
|
||||
checkIfUserIsDriver,
|
||||
getById,
|
||||
} from "../services/functions/usersService";
|
||||
import { closeToast } from "../services/utils";
|
||||
|
||||
interface ScanNewProps {
|
||||
match: {
|
||||
@@ -214,22 +211,9 @@ const Perfil: React.FC<ScanNewProps> = (props) => {
|
||||
|
||||
return (
|
||||
<IonPage>
|
||||
<IonHeader translucent>
|
||||
<IonToolbar>
|
||||
<IonTitle>Seu perfil</IonTitle>
|
||||
<IonButtons slot="start">
|
||||
<IonBackButton text="" defaultHref="/home" />
|
||||
</IonButtons>
|
||||
</IonToolbar>
|
||||
</IonHeader>
|
||||
<PageHeader pageName="Meu perfil"></PageHeader>
|
||||
|
||||
<IonContent fullscreen>
|
||||
<IonHeader collapse="condense">
|
||||
<IonToolbar>
|
||||
<IonTitle size="large">Seu perfil</IonTitle>
|
||||
</IonToolbar>
|
||||
</IonHeader>
|
||||
|
||||
<IonCard>
|
||||
<IonCardContent>
|
||||
<img
|
||||
@@ -337,20 +321,20 @@ const Perfil: React.FC<ScanNewProps> = (props) => {
|
||||
|
||||
<IonItem
|
||||
button
|
||||
onClick={() => history.push({ pathname: "/cadastro-van" })}
|
||||
onClick={() => history.push({ pathname: "/veiculos/cadastrar" })}
|
||||
>
|
||||
<IonIcon icon={carOutline} slot="start" />
|
||||
<IonLabel>Cadastrar van</IonLabel>
|
||||
<IonLabel>Cadastrar veículo</IonLabel>
|
||||
</IonItem>
|
||||
|
||||
{isDriver ? (
|
||||
<>
|
||||
<IonItem
|
||||
button
|
||||
onClick={() => history.push({ pathname: "/minhas-vans" })}
|
||||
onClick={() => history.push({ pathname: "/veiculos/meus" })}
|
||||
>
|
||||
<IonIcon icon={carOutline} slot="start" />
|
||||
<IonLabel>Minhas vans</IonLabel>
|
||||
<IonLabel>Meus veículos</IonLabel>
|
||||
</IonItem>
|
||||
<IonItem
|
||||
button
|
||||
@@ -405,7 +389,7 @@ const Perfil: React.FC<ScanNewProps> = (props) => {
|
||||
position="top"
|
||||
color={toastColor}
|
||||
isOpen={showToast}
|
||||
onDidDismiss={() => setShowToast(false)}
|
||||
onDidDismiss={() => closeToast(setShowToast)}
|
||||
message={toastMessage}
|
||||
duration={2500}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user