fix: move typings
This commit is contained in:
@@ -11,21 +11,15 @@ import ShowMoreButton from "../ShowMoreButton"
|
||||
import StayList from "../StayList"
|
||||
import EmptyPreviousStaysBlock from "./EmptyPreviousStays"
|
||||
|
||||
import { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
|
||||
import type { Page } from "@/types/components/myPages/myStays/page"
|
||||
|
||||
type PreviousStaysProps = {
|
||||
lang: Lang
|
||||
title: string
|
||||
subtitle?: string
|
||||
link: { href: string; text: string } | null
|
||||
}
|
||||
|
||||
export default function PreviousStays({
|
||||
lang,
|
||||
title,
|
||||
subtitle,
|
||||
link,
|
||||
}: PreviousStaysProps) {
|
||||
}: AccountPageComponentProps) {
|
||||
const { data, isFetching, fetchNextPage, hasNextPage } =
|
||||
trpc.user.stays.previous.useInfiniteQuery(
|
||||
{},
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { Lang } from "@/constants/languages"
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import Header from "../Header"
|
||||
@@ -7,19 +6,14 @@ import EmptyUpcomingStaysBlock from "./EmptyUpcomingStays"
|
||||
|
||||
import styles from "./soonest.module.css"
|
||||
|
||||
type UpcomingStaysProps = {
|
||||
lang: Lang
|
||||
title: string
|
||||
subtitle?: string
|
||||
link: { text: string; href: string } | null
|
||||
}
|
||||
import { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
|
||||
|
||||
export default async function UpcomingStays({
|
||||
lang,
|
||||
title,
|
||||
subtitle,
|
||||
link,
|
||||
}: UpcomingStaysProps) {
|
||||
}: AccountPageComponentProps) {
|
||||
const stays = await serverClient().user.stays.soonestUpcoming()
|
||||
|
||||
return (
|
||||
|
||||
@@ -11,21 +11,15 @@ import ShowMoreButton from "../ShowMoreButton"
|
||||
import StayList from "../StayList"
|
||||
import EmptyUpcomingStaysBlock from "./EmptyUpcomingStays"
|
||||
|
||||
import { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
|
||||
import type { Page } from "@/types/components/myPages/myStays/page"
|
||||
|
||||
type UpcomingStaysProps = {
|
||||
lang: Lang
|
||||
title: string
|
||||
subtitle?: string
|
||||
link: { text: string; href: string } | null
|
||||
}
|
||||
|
||||
export default function UpcomingStays({
|
||||
lang,
|
||||
title,
|
||||
subtitle,
|
||||
link,
|
||||
}: UpcomingStaysProps) {
|
||||
}: AccountPageComponentProps) {
|
||||
const { data, hasNextPage, isFetching, fetchNextPage } =
|
||||
trpc.user.stays.upcoming.useInfiniteQuery(
|
||||
{},
|
||||
|
||||
Reference in New Issue
Block a user