Login and Home
This commit is contained in:
74
pedi-foods/Sources/PediFoods/Views/Main/ProfileView.swift
Normal file
74
pedi-foods/Sources/PediFoods/Views/Main/ProfileView.swift
Normal file
@@ -0,0 +1,74 @@
|
||||
import SwiftUI
|
||||
|
||||
struct ProfileView: View {
|
||||
@Binding var root: RootFlow
|
||||
@Binding var selectedTab: MainTab
|
||||
let tokenStore: TokenStore
|
||||
|
||||
var body: some View {
|
||||
VStack(spacing: 20) {
|
||||
header
|
||||
|
||||
VStack(spacing: 12) {
|
||||
NavigationLink("Pedidos") {
|
||||
OrdersView()
|
||||
}
|
||||
|
||||
NavigationLink("Enderecos") {
|
||||
Text("Enderecos")
|
||||
}
|
||||
|
||||
NavigationLink("Ajuda") {
|
||||
Text("Ajuda")
|
||||
}
|
||||
}
|
||||
.font(AppTypography.body)
|
||||
.foregroundStyle(AppColors.textPrimary)
|
||||
|
||||
Spacer()
|
||||
|
||||
SecondaryButton(title: "Sair") {
|
||||
tokenStore.clear()
|
||||
root = .auth
|
||||
}
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
.padding(.top, 24)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.background(AppColors.backgroundLight)
|
||||
}
|
||||
|
||||
private var header: some View {
|
||||
VStack(spacing: 8) {
|
||||
Circle()
|
||||
.fill(AppColors.primary)
|
||||
.frame(width: 72, height: 72)
|
||||
.overlay(
|
||||
Text("DL")
|
||||
.font(.headline)
|
||||
.foregroundStyle(AppColors.textInverse)
|
||||
)
|
||||
|
||||
Text("Daniel Loverde")
|
||||
.font(AppTypography.heading2)
|
||||
.foregroundStyle(AppColors.textPrimary)
|
||||
|
||||
Text("daniel@pedifoods.com.br")
|
||||
.font(.caption)
|
||||
.foregroundStyle(AppColors.secondary)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct OrdersView: View {
|
||||
var body: some View {
|
||||
VStack(spacing: 16) {
|
||||
Text("Pedidos")
|
||||
.font(AppTypography.heading1)
|
||||
Text("Historico vazio")
|
||||
.foregroundStyle(AppColors.secondary)
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.background(AppColors.backgroundLight)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user