pb refresh, profile refresh update
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { badgeKeys, badgeQueries } from "@/features/badges/queries";
|
||||
import Profile from "@/features/players/components/profile";
|
||||
import HeaderSkeleton from "@/features/players/components/profile/header-skeleton";
|
||||
import ProfileSkeleton from "@/features/players/components/profile/skeleton";
|
||||
@@ -24,6 +25,14 @@ export const Route = createFileRoute("/_authed/profile/$playerId")({
|
||||
queryClient,
|
||||
playerQueries.matches(params.playerId)
|
||||
),
|
||||
prefetchServerQuery(
|
||||
queryClient,
|
||||
playerQueries.stats(params.playerId)
|
||||
),
|
||||
prefetchServerQuery(
|
||||
queryClient,
|
||||
badgeQueries.playerBadges(params.playerId)
|
||||
),
|
||||
]);
|
||||
},
|
||||
loader: ({ params, context }) => ({
|
||||
@@ -34,7 +43,7 @@ export const Route = createFileRoute("/_authed/profile/$playerId")({
|
||||
context?.auth.user.id === params.playerId ? "/settings" : undefined,
|
||||
},
|
||||
withPadding: false,
|
||||
refresh: [playerKeys.details(params.playerId), playerKeys.matches(params.playerId), playerKeys.stats(params.playerId)],
|
||||
refresh: [playerKeys.details(params.playerId), playerKeys.matches(params.playerId), playerKeys.stats(params.playerId), badgeKeys.playerBadges(params.playerId)],
|
||||
}),
|
||||
component: () => {
|
||||
const { playerId } = Route.useParams();
|
||||
|
||||
Reference in New Issue
Block a user