diff --git a/components/tabs/Comments.tsx b/app/[locale]/[id]/_components/Comments.tsx similarity index 76% rename from components/tabs/Comments.tsx rename to app/[locale]/[id]/_components/Comments.tsx index 6bd628c..2d11699 100644 --- a/components/tabs/Comments.tsx +++ b/app/[locale]/[id]/_components/Comments.tsx @@ -5,12 +5,11 @@ import { useFormatter } from "next-intl"; import React from "react"; import type { Highline } from "@/app/actions/getHighline"; +import LoadingSkeleton from "@/components/Ranking/LoadingSkeleton"; +import { UsernameLink } from "@/components/Ranking/UsernameLink"; +import SeeMore from "@/components/SeeMore"; import useSupabaseBrowser from "@/utils/supabase/client"; -import LoadingSkeleton from "./Ranking/LoadingSkeleton"; -import { UsernameLink } from "./Ranking/UsernameLink"; -import SeeMore from "./SeeMore"; - interface Props { highline: Highline; } @@ -52,8 +51,20 @@ function Comments({ highline }: Props) { }); if (isLoading) { - // TODO: Create a different loading skeleton for comment section - return ; + return ( +
+ {[...Array(5)].map((_, index) => ( +
+
+
+
+
+
+
+
+ ))} +
+ ); } if (isError) { @@ -79,7 +90,6 @@ function Comments({ highline }: Props) {
- {/*

{comment.instagram}

*/} {format.relativeTime(new Date(comment.created_at))} diff --git a/app/[locale]/[id]/_components/HighlineCard.tsx b/app/[locale]/[id]/_components/HighlineCard.tsx index ca31158..e0eae41 100644 --- a/app/[locale]/[id]/_components/HighlineCard.tsx +++ b/app/[locale]/[id]/_components/HighlineCard.tsx @@ -1,9 +1,9 @@ import { Highline } from "@/app/actions/getHighline"; import HighlineImage from "@/components/HighlineImage"; -import Tabs from "@/components/tabs/Tabs"; import { Card, CardContent } from "@/components/ui/card"; import { FavoriteHighline } from "../../_components/FavoriteHighline"; +import { HighlineTabs } from "./highline-tabs"; import { HighlineHeader } from "./HighlineHeader"; function HighlineCard({ highline }: { highline: Highline }) { @@ -15,7 +15,7 @@ function HighlineCard({ highline }: { highline: Highline }) {
- + ); diff --git a/components/tabs/Info.tsx b/app/[locale]/[id]/_components/Info.tsx similarity index 100% rename from components/tabs/Info.tsx rename to app/[locale]/[id]/_components/Info.tsx diff --git a/components/tabs/Tabs.tsx b/app/[locale]/[id]/_components/highline-tabs.tsx similarity index 92% rename from components/tabs/Tabs.tsx rename to app/[locale]/[id]/_components/highline-tabs.tsx index c029392..c8cbe96 100644 --- a/components/tabs/Tabs.tsx +++ b/app/[locale]/[id]/_components/highline-tabs.tsx @@ -6,18 +6,18 @@ import { useTranslations } from "next-intl"; import { useMemo } from "react"; import type { Highline } from "@/app/actions/getHighline"; +import { Ranking } from "@/components/Ranking"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { useQueryString } from "@/hooks/useQueryString"; import Comments from "./Comments"; import Info from "./Info"; -import Ranking from "./Ranking"; interface Props { highline: Highline; } -function HighlineTabs({ highline }: Props) { +export const HighlineTabs = ({ highline }: Props) => { const t = useTranslations("highline.tabs"); const searchParams = useSearchParams(); const { replaceQueryParam } = useQueryString(); @@ -39,7 +39,7 @@ function HighlineTabs({ highline }: Props) { { id: "ranking", label: "Ranking", - content: , + content: , }, ], [t, highline] @@ -82,6 +82,4 @@ function HighlineTabs({ highline }: Props) { ); -} - -export default HighlineTabs; +}; diff --git a/app/[locale]/[id]/page.tsx b/app/[locale]/[id]/page.tsx index 4e3ba91..e2dbc6e 100644 --- a/app/[locale]/[id]/page.tsx +++ b/app/[locale]/[id]/page.tsx @@ -2,7 +2,6 @@ import { notFound } from "next/navigation"; import { cache } from "react"; import { getHighline } from "@/app/actions/getHighline"; -import CreateHighline from "@/components/CreateHighline"; import HighlineCard from "./_components/HighlineCard"; @@ -15,7 +14,7 @@ type Props = { const getHigh = cache(async ({ id }: { id: string }) => { const result = await getHighline({ - id, + id: [id], }); return result.data; }); diff --git a/app/[locale]/_components/Highline.tsx b/app/[locale]/_components/Highline.tsx index 1a7238c..0a70b29 100644 --- a/app/[locale]/_components/Highline.tsx +++ b/app/[locale]/_components/Highline.tsx @@ -2,7 +2,7 @@ import { ArrowRightIcon } from "@radix-ui/react-icons"; import { UnfoldHorizontalIcon, UnfoldVerticalIcon } from "lucide-react"; import { useTranslations } from "next-intl"; -import { Highline } from "@/app/actions/getHighline"; +import type { Highline } from "@/app/actions/getHighline"; import { Button } from "@/components/ui/button"; import { Card, @@ -11,21 +11,27 @@ import { CardHeader, CardTitle, } from "@/components/ui/card"; +import { cn } from "@/lib/utils"; import { Link } from "@/navigation"; -import type { Functions } from "@/utils/supabase/database.types"; import HighlineImage from "../../../components/HighlineImage"; import { FavoriteHighline } from "./FavoriteHighline"; interface Props { highline: Highline; + classname?: string; } -export function Highline({ highline }: Props) { +export function Highline({ highline, classname }: Props) { const t = useTranslations("home"); return ( - +
diff --git a/app/[locale]/_components/hero-promo-card.tsx b/app/[locale]/_components/hero-promo-card.tsx new file mode 100644 index 0000000..0b16009 --- /dev/null +++ b/app/[locale]/_components/hero-promo-card.tsx @@ -0,0 +1,33 @@ +import Image from "next/image"; +import React from "react"; + +import { BorderBeam } from "@/components/ui/border-beam"; +import { Link } from "@/navigation"; +import { useTranslations } from "next-intl"; + +export const HeroPromoCard = () => { + const t = useTranslations("festival"); + + return ( + + Person walking on a Highline + +
+

+ Festival Chooselife 2024 +

+

{t("cardSubTitle")}

+
+ + ); +}; diff --git a/app/[locale]/festival/_components/festival-tabs.tsx b/app/[locale]/festival/_components/festival-tabs.tsx new file mode 100644 index 0000000..bfadde1 --- /dev/null +++ b/app/[locale]/festival/_components/festival-tabs.tsx @@ -0,0 +1,56 @@ +import { cookies } from "next/headers"; +import React from "react"; + +import { getHighline } from "@/app/actions/getHighline"; +import { Ranking } from "@/components/Ranking"; +import { TabsContent } from "@/components/ui/tabs"; +import { useSupabaseServer } from "@/utils/supabase/server"; + +import { Highline } from "../../_components/Highline"; + +export const FestivalTabs = async () => { + const cookieStore = cookies(); + const supabase = useSupabaseServer(cookieStore); + + const { data: sectors } = await supabase + .from("sector") + .select("*, highline(id)"); + + const highline_ids = sectors?.flatMap((sector) => + sector.highline.map((high) => high.id) + ); + + const { data: highlines } = await getHighline({ + id: sectors?.flatMap((sector) => sector.highline.map((high) => high.id)), + }); + + return ( + <> + + + + + {sectors?.map((sector) => ( +
+

{sector.name}

+
+ {sector.highline.map((high) => { + const highline = highlines?.find((h) => h.id === high.id); + return highline ? ( + + ) : null; + })} +
+
+ ))} +
+ + ); +}; diff --git a/app/[locale]/festival/_components/timeline.tsx b/app/[locale]/festival/_components/timeline.tsx new file mode 100644 index 0000000..c943f54 --- /dev/null +++ b/app/[locale]/festival/_components/timeline.tsx @@ -0,0 +1,118 @@ +import { ClockIcon } from "lucide-react"; +import React from "react"; + +export const timeline = () => {}; + +// import { AvatarImage, AvatarFallback, Avatar } from "@/components/ui/avatar" + +export const Timeline = () => { + return ( +
+
+
+
+
+
Ínicio de festival
+
+ + 9:00 AM +
+
+
+ Abertura oficila das vias de Highline +
+
+
+
+
+
Oficina de resgate
+
+ + 11:00 AM +
+
+
+ Ministrada por ..., você vai aprender tudo sobre resgate +
+
+ {/* Sponsor Logo */} +
+
Pessoa XXX
+
+ Highliner +
+
+
+
+
+
+
+
Panel Discussion
+
+ + 2:00 PM +
+
+
+ Join our panel of experts for an insightful discussion on the future + of the industry. +
+
+ {/* + + JS + */} +
+
Jane Smith
+
+ Industry Analyst +
+
+
+
+
+
+
+
Networking Reception
+
+ + 5:00 PM +
+
+
+ Join us for drinks and hors oeuvres to network with other attendees. +
+
+ {/* Sponsor Logo */} +
+
Globex Corporation
+
+ Gold Sponsor +
+
+
+
+
+
+ ); +}; diff --git a/app/[locale]/festival/page.tsx b/app/[locale]/festival/page.tsx new file mode 100644 index 0000000..8b3ace7 --- /dev/null +++ b/app/[locale]/festival/page.tsx @@ -0,0 +1,56 @@ +import Image from "next/image"; +import { useTranslations } from "next-intl"; +import { Suspense } from "react"; + +import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; + +import { FestivalTabs } from "./_components/festival-tabs"; + +type Props = { + params: { locale: string; username: string }; + searchParams: { [key: string]: string | undefined }; +}; + +export default function Festival({ + params: { username }, + searchParams, +}: Props) { + const t = useTranslations("festival"); + + return ( +
+ Illustration of a someone walking a Highline +
+
+
+
+

+ Festival Chooselife +

+

+ {t("pageSubTitle")} +

+
+ + + {/* Schedule */} + Ranking + Highlines + + {/* +
foo
+
*/} + loading...
}> + + + +
+
+
+ ); +} diff --git a/app/[locale]/page.tsx b/app/[locale]/page.tsx index fcb6f07..7948af2 100644 --- a/app/[locale]/page.tsx +++ b/app/[locale]/page.tsx @@ -9,6 +9,7 @@ import { getHighline } from "@/app/actions/getHighline"; import CreateHighline from "@/components/CreateHighline"; import MapToggle from "@/components/Map/MapToggle"; +import { HeroPromoCard } from "./_components/hero-promo-card"; import { HighlineList } from "./_components/HighlineList"; import Search from "./_components/search"; @@ -74,6 +75,7 @@ export default async function Home({ ) : ( <> + diff --git a/app/actions/getHighline.ts b/app/actions/getHighline.ts index c2facf3..9d8bbdb 100644 --- a/app/actions/getHighline.ts +++ b/app/actions/getHighline.ts @@ -6,7 +6,7 @@ import { cookies } from "next/headers"; import { Database, Functions } from "@/utils/supabase/database.types"; type Props = { - id?: string; + id?: string[]; searchValue?: string; pageParam?: number; pageSize?: number; @@ -44,7 +44,7 @@ export const getHighline = async ({ } = await supabase.auth.getUser(); const result = await supabase.rpc("get_highline", { - ...(id ? { searchid: id } : {}), + ...(id && id.length > 0 ? { searchid: id } : {}), ...(user?.id ? { userid: user.id } : {}), ...(searchValue ? { searchname: searchValue } : {}), ...(pageParam && pageSize diff --git a/components/Map/Markers.tsx b/components/Map/Markers.tsx index d70e873..191fd58 100644 --- a/components/Map/Markers.tsx +++ b/components/Map/Markers.tsx @@ -132,7 +132,7 @@ export const Markers = ({ if (!highlines?.find((high) => high.id === focusedMarker)) { const { data } = await queryClient.ensureQueryData({ queryKey: ["highline", focusedMarker], - queryFn: () => getHighline({ id: focusedMarker }), + queryFn: () => getHighline({ id: [focusedMarker] }), }); if (data && data.length === 1) { map.setView([data[0].anchor_a_lat, data[0].anchor_a_long], 18); diff --git a/components/Map/Selected.tsx b/components/Map/Selected.tsx index 0173875..be84a16 100644 --- a/components/Map/Selected.tsx +++ b/components/Map/Selected.tsx @@ -28,7 +28,7 @@ export const Selected = ({ const { data, pending } = useQueries({ queries: highlineIds.map((id) => ({ queryKey: ["highline", id], - queryFn: async () => getHighline({ id }), + queryFn: async () => getHighline({ id: [id] }), })), combine: (results) => { return { diff --git a/components/tabs/Ranking/Cadenas.tsx b/components/Ranking/Cadenas.tsx similarity index 88% rename from components/tabs/Ranking/Cadenas.tsx rename to components/Ranking/Cadenas.tsx index c0713a3..a6ef193 100644 --- a/components/tabs/Ranking/Cadenas.tsx +++ b/components/Ranking/Cadenas.tsx @@ -1,7 +1,6 @@ import { useInfiniteQuery } from "@tanstack/react-query"; import React from "react"; -import type { Highline } from "@/app/actions/getHighline"; import useSupabaseBrowser from "@/utils/supabase/client"; import SeeMore from "../SeeMore"; @@ -9,17 +8,17 @@ import { Leaderboard } from "./leaderboard"; import LoadingSkeleton from "./LoadingSkeleton"; interface Props { - highline: Highline; + highlines_ids: string[]; } const PAGE_SIZE = 5; -function Cadenas({ highline }: Props) { +function Cadenas({ highlines_ids }: Props) { const supabase = useSupabaseBrowser(); async function fetchCadenas({ pageParam = 1 }) { const { data, error } = await supabase.rpc("get_total_cadenas", { - highline_id: highline.id, + highline_ids: highlines_ids, page_number: pageParam, page_size: PAGE_SIZE, }); @@ -33,14 +32,14 @@ function Cadenas({ highline }: Props) { fetchNextPage, hasNextPage, } = useInfiniteQuery({ - queryKey: ["entry", highline.id, "cadenas"], + queryKey: ["entry", highlines_ids, "cadenas"], queryFn: ({ pageParam }) => fetchCadenas({ pageParam }), initialPageParam: 1, getNextPageParam: (lastPage, pages) => { const nextPage = pages.length + 1; return lastPage?.length === PAGE_SIZE ? nextPage : undefined; }, - enabled: !!highline.id, + enabled: !!highlines_ids.length, }); if (isLoading) { diff --git a/components/tabs/Ranking/CategoryDropdown.tsx b/components/Ranking/CategoryDropdown.tsx similarity index 81% rename from components/tabs/Ranking/CategoryDropdown.tsx rename to components/Ranking/CategoryDropdown.tsx index e1e82d3..82cafc3 100644 --- a/components/tabs/Ranking/CategoryDropdown.tsx +++ b/components/Ranking/CategoryDropdown.tsx @@ -15,17 +15,21 @@ import { } from "@/components/ui/dropdown-menu"; import { useQueryString } from "@/hooks/useQueryString"; -import { type Categories, type Category } from "./index"; +import { type Category } from "./index"; interface Props { selectedCategory: Category; + visibleCategories: Category[]; } -export const CategoryDropdown = ({ selectedCategory }: Props) => { +export const CategoryDropdown = ({ + selectedCategory, + visibleCategories, +}: Props) => { const t = useTranslations("highline.tabs.ranking"); const { replaceQueryParam } = useQueryString(); - const categories = useMemo( + const categories = useMemo>( () => ({ speedline: { label: "Speedline" }, cadenas: { label: t("cadenas") }, @@ -53,9 +57,9 @@ export const CategoryDropdown = ({ selectedCategory }: Props) => { value={selectedCategory} onValueChange={(category) => replaceQueryParam("category", category)} > - {Object.entries(categories).map(([key, value]) => ( - - {value.label} + {visibleCategories.map((category) => ( + + {categories[category].label} ))} diff --git a/components/tabs/Ranking/Distance.tsx b/components/Ranking/Distance.tsx similarity index 88% rename from components/tabs/Ranking/Distance.tsx rename to components/Ranking/Distance.tsx index 21bf933..77bc7ec 100644 --- a/components/tabs/Ranking/Distance.tsx +++ b/components/Ranking/Distance.tsx @@ -1,7 +1,6 @@ import { useInfiniteQuery } from "@tanstack/react-query"; import React from "react"; -import type { Highline } from "@/app/actions/getHighline"; import useSupabaseBrowser from "@/utils/supabase/client"; import SeeMore from "../SeeMore"; @@ -9,17 +8,17 @@ import { Leaderboard } from "./leaderboard"; import LoadingSkeleton from "./LoadingSkeleton"; interface Props { - highline: Highline; + highlines_ids: string[]; } const PAGE_SIZE = 5; -function Distance({ highline }: Props) { +function Distance({ highlines_ids }: Props) { const supabase = useSupabaseBrowser(); async function fetchEntries({ pageParam = 1 }) { const { data, error } = await supabase.rpc("get_total_walked", { - highline_id: highline.id, + highline_ids: highlines_ids, page_number: pageParam, page_size: PAGE_SIZE, }); @@ -33,14 +32,14 @@ function Distance({ highline }: Props) { fetchNextPage, hasNextPage, } = useInfiniteQuery({ - queryKey: ["entry", highline.id, "distance"], + queryKey: ["entry", highlines_ids, "distance"], queryFn: ({ pageParam }) => fetchEntries({ pageParam }), initialPageParam: 1, getNextPageParam: (lastPage, pages) => { const nextPage = pages.length + 1; return lastPage?.length === PAGE_SIZE ? nextPage : undefined; }, - enabled: !!highline.id, + enabled: !!highlines_ids.length, }); if (isLoading) { diff --git a/components/tabs/Ranking/FullLine.tsx b/components/Ranking/FullLine.tsx similarity index 84% rename from components/tabs/Ranking/FullLine.tsx rename to components/Ranking/FullLine.tsx index 01d9877..813bd39 100644 --- a/components/tabs/Ranking/FullLine.tsx +++ b/components/Ranking/FullLine.tsx @@ -1,7 +1,6 @@ import { useInfiniteQuery } from "@tanstack/react-query"; import React from "react"; -import type { Highline } from "@/app/actions/getHighline"; import useSupabaseBrowser from "@/utils/supabase/client"; import SeeMore from "../SeeMore"; @@ -9,17 +8,17 @@ import { Leaderboard } from "./leaderboard"; import LoadingSkeleton from "./LoadingSkeleton"; interface Props { - highline: Highline; + highlines_ids: string[]; } const PAGE_SIZE = 5; -function FullLine({ highline }: Props) { +function FullLine({ highlines_ids }: Props) { const supabase = useSupabaseBrowser(); async function fetchFullLine({ pageParam = 1 }) { - const { data, error } = await supabase.rpc("get_total_full_lines", { - highline_id: highline.id, + const { data } = await supabase.rpc("get_total_full_lines", { + highline_ids: highlines_ids, page_number: pageParam, page_size: PAGE_SIZE, }); @@ -33,14 +32,14 @@ function FullLine({ highline }: Props) { fetchNextPage, hasNextPage, } = useInfiniteQuery({ - queryKey: ["entry", highline.id, "fullLine"], + queryKey: ["entry", highlines_ids, "fullLine"], queryFn: ({ pageParam }) => fetchFullLine({ pageParam }), initialPageParam: 1, getNextPageParam: (lastPage, pages) => { const nextPage = pages.length + 1; return lastPage?.length === PAGE_SIZE ? nextPage : undefined; }, - enabled: !!highline.id, + enabled: !!highlines_ids.length, }); if (isLoading) { diff --git a/components/Ranking/LoadingSkeleton.tsx b/components/Ranking/LoadingSkeleton.tsx new file mode 100644 index 0000000..8681032 --- /dev/null +++ b/components/Ranking/LoadingSkeleton.tsx @@ -0,0 +1,75 @@ +import { CrownIcon } from "lucide-react"; +import React from "react"; + +function LoadingSkeleton() { + return ( +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
    + {[...Array(5)].map((_, index) => ( +
  • +
    +
    +
    +
    +
    +
  • + ))} +
+
+ ); +} + +export default LoadingSkeleton; diff --git a/components/tabs/Ranking/Speedline.tsx b/components/Ranking/Speedline.tsx similarity index 89% rename from components/tabs/Ranking/Speedline.tsx rename to components/Ranking/Speedline.tsx index ea9d3c8..20272a7 100644 --- a/components/tabs/Ranking/Speedline.tsx +++ b/components/Ranking/Speedline.tsx @@ -1,7 +1,6 @@ import { useInfiniteQuery } from "@tanstack/react-query"; import React from "react"; -import type { Highline } from "@/app/actions/getHighline"; import { transformSecondsToTimeString } from "@/utils/helperFunctions"; import useSupabaseBrowser from "@/utils/supabase/client"; @@ -10,17 +9,17 @@ import { Leaderboard } from "./leaderboard"; import LoadingSkeleton from "./LoadingSkeleton"; interface Props { - highline: Highline; + highlines_id: string; } const PAGE_SIZE = 5; -function Speedline({ highline }: Props) { +function Speedline({ highlines_id }: Props) { const supabase = useSupabaseBrowser(); async function fetchEntries({ pageParam = 1 }) { const { data, error } = await supabase.rpc("get_crossing_time", { - highline_id: highline.id, + highline_id: highlines_id, page_number: pageParam, page_size: PAGE_SIZE, }); @@ -34,14 +33,14 @@ function Speedline({ highline }: Props) { fetchNextPage, hasNextPage, } = useInfiniteQuery({ - queryKey: ["entry", highline.id, "speedline"], + queryKey: ["entry", highlines_id, "speedline"], queryFn: ({ pageParam }) => fetchEntries({ pageParam }), initialPageParam: 1, getNextPageParam: (lastPage, pages) => { const nextPage = pages.length + 1; return lastPage?.length === PAGE_SIZE ? nextPage : undefined; }, - enabled: !!highline.id, + enabled: !!highlines_id.length, }); if (isLoading) { diff --git a/components/tabs/Ranking/UsernameLink.tsx b/components/Ranking/UsernameLink.tsx similarity index 100% rename from components/tabs/Ranking/UsernameLink.tsx rename to components/Ranking/UsernameLink.tsx diff --git a/components/Ranking/index.tsx b/components/Ranking/index.tsx new file mode 100644 index 0000000..b3e8906 --- /dev/null +++ b/components/Ranking/index.tsx @@ -0,0 +1,59 @@ +"use client"; + +import { useQueryString } from "@/hooks/useQueryString"; + +import Cadenas from "./Cadenas"; +import { CategoryDropdown } from "./CategoryDropdown"; +import Distance from "./Distance"; +import FullLine from "./FullLine"; +import Speedline from "./Speedline"; + +interface Props { + highlines_ids: string[]; + visibleCategories?: Category[]; +} + +export type Category = "speedline" | "distance" | "cadenas" | "fullLine"; + +const CategoryRenderer: React.FC< + Props & { + category: Category; + } +> = ({ category, highlines_ids, visibleCategories }) => { + if (!visibleCategories?.includes(category)) return null; + switch (category) { + case "speedline": + return ; + case "distance": + return ; + case "cadenas": + return ; + case "fullLine": + return ; + default: + return null; + } +}; + +export const Ranking: React.FC = ({ + highlines_ids, + visibleCategories = ["cadenas", "distance", "fullLine", "speedline"], // All categories visible by default, +}) => { + const { searchParams } = useQueryString(); + const selectedCategory = + (searchParams.get("category") as Category) || "distance"; + + return ( +
+ + +
+ ); +}; diff --git a/components/tabs/Ranking/leaderboard.tsx b/components/Ranking/leaderboard.tsx similarity index 96% rename from components/tabs/Ranking/leaderboard.tsx rename to components/Ranking/leaderboard.tsx index f3f662f..8f538c4 100644 --- a/components/tabs/Ranking/leaderboard.tsx +++ b/components/Ranking/leaderboard.tsx @@ -141,11 +141,6 @@ export const LeaderboardRow = ({
- {/*
- {format.dateTime(new Date(entry.created_at), { - dateStyle: "short", - })} -
*/}
{value} diff --git a/components/tabs/SeeMore.tsx b/components/SeeMore.tsx similarity index 100% rename from components/tabs/SeeMore.tsx rename to components/SeeMore.tsx diff --git a/components/tabs/Ranking/LoadingSkeleton.tsx b/components/tabs/Ranking/LoadingSkeleton.tsx deleted file mode 100644 index 7a10857..0000000 --- a/components/tabs/Ranking/LoadingSkeleton.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import React from "react"; - -function LoadingSkeleton() { - return ( -
    -
  • -
    -
    -
  • -
  • -
    -
    -
  • -
  • -
    -
    -
  • -
  • -
    -
    -
  • -
  • -
    -
    -
  • -
  • -
    -
    -
  • -
  • -
    -
    -
  • -
  • -
    -
    -
  • -
  • -
    -
    -
  • -
  • -
    -
    -
  • -
- ); -} - -export default LoadingSkeleton; diff --git a/components/tabs/Ranking/Podium.tsx b/components/tabs/Ranking/Podium.tsx deleted file mode 100644 index 6a2222d..0000000 --- a/components/tabs/Ranking/Podium.tsx +++ /dev/null @@ -1,130 +0,0 @@ -import { cn } from "@/lib/utils"; -import { cva, type VariantProps } from "class-variance-authority"; -import { CrownIcon, UserIcon } from "lucide-react"; -import React from "react"; - -interface PodiumProps { - name: string; - value: string; - position: 1 | 2 | 3; -} - -const gradientVariants = cva( - "flex w-[96%] flex-col items-center gap-3 bg-gradient-to-t to-80% py-4", - { - variants: { - gradient: { - gold: "from-yellow-500/5 dark:from-yellow-500/10", - silver: "from-neutral-300/20 dark:from-neutral-300/10", - bronze: "from-amber-700/5 dark:from-amber-700/10", - }, - }, - defaultVariants: { - gradient: "gold", - }, - } -); - -const podiumVariants = cva( - "xs:rounded-b-md flex w-full items-start justify-center bg-neutral-100 dark:bg-neutral-900/75", - { - variants: { - size: { - small: "p-4 md:p-6", - large: "md:p-6 md:py-12 p-4 py-8", - }, - }, - } -); - -const Podium = ({ name, value, position }: PodiumProps) => { - const variant = - position === 1 ? "gold" : position === 2 ? "silver" : "bronze"; - - return ( -
-
-
-
-
-
- -
-
-