diff --git a/apps/dashboard/src/components/ServerStats/Chart.tsx b/apps/dashboard/src/components/ServerStats/Chart.tsx index 35802724d..24dddf27a 100644 --- a/apps/dashboard/src/components/ServerStats/Chart.tsx +++ b/apps/dashboard/src/components/ServerStats/Chart.tsx @@ -24,7 +24,7 @@ const Chart = ({ dataKey?: keyof T; }) => { return ( -
+
{lines.map((key) => ( diff --git a/apps/dashboard/src/components/UserDetails/Content.tsx b/apps/dashboard/src/components/UserDetails/Content.tsx index 34ceaadaf..e591c2f3b 100644 --- a/apps/dashboard/src/components/UserDetails/Content.tsx +++ b/apps/dashboard/src/components/UserDetails/Content.tsx @@ -39,7 +39,7 @@ const Content: React.FC<{ if (!user) return; return ( -
+
{user.image ? ( diff --git a/apps/dashboard/src/pages/PlatformSettings.tsx b/apps/dashboard/src/pages/PlatformSettings.tsx index 856a420a3..dcfcafd6b 100644 --- a/apps/dashboard/src/pages/PlatformSettings.tsx +++ b/apps/dashboard/src/pages/PlatformSettings.tsx @@ -2,7 +2,7 @@ import Cache from "@/components/Settings/Cache"; const Settings = () => { return ( -
+
); diff --git a/apps/nova/src/components/Tutors/Content.tsx b/apps/nova/src/components/Tutors/Content.tsx index b8d883339..ad51179b6 100644 --- a/apps/nova/src/components/Tutors/Content.tsx +++ b/apps/nova/src/components/Tutors/Content.tsx @@ -1,13 +1,12 @@ +import BookLesson from "@/components/Lessons/BookLesson"; +import { Route } from "@/types/routes"; import { Loading } from "@litespace/luna/Loading"; -import { Element, ITutor, Void } from "@litespace/types"; -import React, { useCallback, useState } from "react"; import { TutorCard } from "@litespace/luna/TutorCard"; import { asFullAssetUrl } from "@litespace/luna/backend"; -import { Route } from "@/types/routes"; -import { useNavigate } from "react-router-dom"; +import { Element, ITutor, Void } from "@litespace/types"; import { motion } from "framer-motion"; +import React, { useCallback, useState } from "react"; import { InView } from "react-intersection-observer"; -import BookLesson from "@/components/Lessons/BookLesson"; type Tutor = Element; @@ -19,8 +18,6 @@ const Content: React.FC<{ more: Void; hasMore: boolean; }> = ({ tutors, loading, error, more, hasMore, fetching }) => { - const navigate = useNavigate(); - const [tutor, setTutor] = useState(null); const openBookingDialog = useCallback((tutor: Tutor) => setTutor(tutor), []); @@ -53,7 +50,6 @@ const Content: React.FC<{ studentCount={tutor.studentCount} rating={tutor.avgRating} onBook={() => openBookingDialog(tutor)} - onOpenProfile={() => navigate(profileUrl)} profileUrl={profileUrl} imageUrl={tutor.image ? asFullAssetUrl(tutor.image) : null} /> diff --git a/packages/luna/src/components/Avatar/Avatar.tsx b/packages/luna/src/components/Avatar/Avatar.tsx index a029fd387..911b389b7 100644 --- a/packages/luna/src/components/Avatar/Avatar.tsx +++ b/packages/luna/src/components/Avatar/Avatar.tsx @@ -7,7 +7,11 @@ export const Avatar: React.FC<{ src?: string; alt?: string; seed?: string; -}> = ({ src, alt, seed }) => { + /** + * property sets how the image should be resized to fit its container. + */ + object?: "fill" | "contain" | "cover" | "none" | "scale-down"; +}> = ({ src, alt, seed, object = "contain" }) => { const [status, setStatus] = useState("loading"); const onLoad = useCallback(() => { @@ -24,7 +28,14 @@ export const Avatar: React.FC<{ data-status={status} className={cn( "tw-opacity-0 tw-transition-opacity tw-duration-300 tw-ease-linear", - "data-[status=loaded]:tw-opacity-100 tw-absolute tw-object-contain tw-w-full tw-h-full" + "data-[status=loaded]:tw-opacity-100 tw-absolute tw-w-full tw-h-full", + { + "tw-object-contain": object === "contain", + "tw-object-fill": object === "fill", + "tw-object-cover": object === "cover", + "tw-object-none": object === "none", + "tw-object-scale-down": object === "scale-down", + } )} src={src} alt={alt} @@ -40,7 +51,10 @@ export const Avatar: React.FC<{ "tw-absolute tw-top-0 tw-left-0 tw-w-full tw-h-full tw-z-[1]" )} > - +
); diff --git a/packages/luna/src/components/Call/PreCallUserPreview.tsx b/packages/luna/src/components/Call/PreCallUserPreview.tsx index 4e028304e..56b5df72c 100644 --- a/packages/luna/src/components/Call/PreCallUserPreview.tsx +++ b/packages/luna/src/components/Call/PreCallUserPreview.tsx @@ -17,7 +17,7 @@ export const PreCallUserPreview: React.FC<{ }, [stream, camera]); return ( -
+
{camera ? (