feat: finish my pages overview page according to wireframe
This commit is contained in:
6
types/components/myPages/challenges.ts
Normal file
6
types/components/myPages/challenges.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import type { User } from "@/types/user"
|
||||
|
||||
export type ChallengesProps = {
|
||||
journeys: User["journeys"]
|
||||
victories: User["victories"]
|
||||
}
|
||||
5
types/components/myPages/overview.ts
Normal file
5
types/components/myPages/overview.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { User } from "@/types/user"
|
||||
|
||||
export type OverviewProps = {
|
||||
user: User
|
||||
}
|
||||
5
types/components/myPages/shortcuts.ts
Normal file
5
types/components/myPages/shortcuts.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { User } from "@/types/user"
|
||||
|
||||
export type ShortcutsProps = {
|
||||
shortcuts: User["shortcuts"]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
export type StayProps = {
|
||||
dateArrive: Date
|
||||
dateDepart: Date
|
||||
guests: number
|
||||
hotel: string
|
||||
}
|
||||
7
types/components/myPages/stays.ts
Normal file
7
types/components/myPages/stays.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { Stay, User } from "@/types/user"
|
||||
|
||||
export type StaysProps = {
|
||||
stays: User["stays"]
|
||||
}
|
||||
|
||||
export type StayProps = Stay
|
||||
36
types/user.ts
Normal file
36
types/user.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { getUserSchema } from "@/server/routers/user/output"
|
||||
|
||||
type Journey = {
|
||||
tag: string
|
||||
title: string
|
||||
}
|
||||
|
||||
type ShortcutLink = {
|
||||
href: string
|
||||
title: string
|
||||
}
|
||||
|
||||
export type Stay = {
|
||||
dateArrive: Date
|
||||
dateDepart: Date
|
||||
guests: number
|
||||
hotel: string
|
||||
}
|
||||
|
||||
type Victory = {
|
||||
tag: string
|
||||
title: string
|
||||
}
|
||||
|
||||
export interface User extends z.infer<typeof getUserSchema> {
|
||||
journeys: Journey[]
|
||||
membershipId: number
|
||||
nights: number
|
||||
points: number
|
||||
qualifyingPoints: number
|
||||
shortcuts: ShortcutLink[]
|
||||
stays: Stay[]
|
||||
victories: Victory[]
|
||||
}
|
||||
Reference in New Issue
Block a user