diff --git a/client/app/components/LastPlays.tsx b/client/app/components/LastPlays.tsx
index 2bc1cc3..c1e1add 100644
--- a/client/app/components/LastPlays.tsx
+++ b/client/app/components/LastPlays.tsx
@@ -4,6 +4,7 @@ import { timeSince } from "~/utils/utils"
import ArtistLinks from "./ArtistLinks"
import { deleteListen, getLastListens, type getItemsArgs, type Listen } from "api/api"
import { Link } from "react-router"
+import { useAppContext } from "~/providers/AppProvider"
interface Props {
limit: number
@@ -14,6 +15,8 @@ interface Props {
}
export default function LastPlays(props: Props) {
+ const { user } = useAppContext()
+ console.log(user)
const { isPending, isError, data, error } = useQuery({
queryKey: ['last-listens', {
limit: props.limit,
@@ -69,11 +72,12 @@ export default function LastPlays(props: Props) {
{listens.map((item) => (
- |
+ |
diff --git a/client/app/routes/Charts/Listens.tsx b/client/app/routes/Charts/Listens.tsx
index 979e1c1..2dff3f2 100644
--- a/client/app/routes/Charts/Listens.tsx
+++ b/client/app/routes/Charts/Listens.tsx
@@ -4,6 +4,7 @@ import { deleteListen, type Listen, type PaginatedResponse } from "api/api";
import { timeSince } from "~/utils/utils";
import ArtistLinks from "~/components/ArtistLinks";
import { useState } from "react";
+import { useAppContext } from "~/providers/AppProvider";
export async function clientLoader({ request }: LoaderFunctionArgs) {
const url = new URL(request.url);
@@ -25,6 +26,7 @@ export default function Listens() {
const { listens: initialData } = useLoaderData<{ listens: PaginatedResponse }>();
const [items, setItems] = useState(null)
+ const { user } = useAppContext()
const handleDelete = async (listen: Listen) => {
if (!initialData) return
@@ -61,11 +63,12 @@ export default function Listens() {
{listens.map((item) => (
- |
+ |
| |