-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add visit card components and improve navbar styling
- Loading branch information
Daniel Patek
committed
Feb 20, 2025
1 parent
9b8d6d7
commit 85f18e1
Showing
27 changed files
with
452 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
"use server"; | ||
|
||
import { auth } from "@/auth"; | ||
import { User } from "next-auth"; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44
app/(with-navbar)/(authenticated)/profil/TabsAndContent.tsx
This file was deleted.
Oops, something went wrong.
File renamed without changes.
35 changes: 35 additions & 0 deletions
35
app/(with-navbar)/(with-footer)/(authenticated)/navstivene/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { getAllUserFavouritesIds } from "@/actions/favourites/favourites.action"; | ||
import { getAllUserRatings } from "@/actions/ratings/ratings.action"; | ||
import { getTowersByIDs } from "@/actions/towers/towers.action"; | ||
import { getAllUserVisits } from "@/actions/visits/visits.action"; | ||
import ProfileVisits from "@/components/profile/ProfileVisits"; | ||
import VisitsStats from "@/components/profile/visit-card/VisitsStats"; | ||
import { Metadata } from "next"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Navštívené rozhledny", | ||
}; | ||
|
||
const VisitedTowersPage = async () => { | ||
const promises = [getAllUserFavouritesIds(), getAllUserVisits(), getAllUserRatings()]; | ||
const [favouritesIds, visits, ratings] = await Promise.all(promises); | ||
const towerIds = [...favouritesIds, ...visits.map((visit) => visit.tower_id), ...ratings.map((rating) => rating.tower_id)]; | ||
const uniqueTowerIds = Array.from(new Set(towerIds)); | ||
const towers = await getTowersByIDs(uniqueTowerIds); | ||
|
||
return ( | ||
<div className="flex flex-col my-8 gap-5 max-w-[calc(min(99dvw,80rem))] px-3 xl:px-0 m-auto"> | ||
<article className="prose max-w-max px-3"> | ||
<h1 className="text-2xl sm:text-3xl lg:text-4xl">Moje navštívené rozhledny</h1> | ||
<p className="text-sm sm:text-base lg:text-lg"> | ||
Zde najdete seznam všech rozhleden, které jste navštívili. Pokud jste nějakou rozhlednu navštívili, ale není zde uvedena, můžete | ||
si návštěvu přidat na stránce dané rozhledny. | ||
</p> | ||
</article> | ||
<VisitsStats visits={visits} towers={towers} /> | ||
<ProfileVisits visits={visits} towers={towers} ratings={ratings} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default VisitedTowersPage; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.