auto refresh the player data when claiming a profile
Some checks are pending
Deploy Website / deploy (push) Waiting to run
Deploy Backend / deploy (push) Successful in 3m33s

This commit is contained in:
Lee
2024-10-09 15:18:42 +01:00
parent 580665b2f6
commit 094e030f11
4 changed files with 15 additions and 4 deletions

View File

@ -7,6 +7,8 @@ import useDatabase from "../../hooks/use-database";
import { useToast } from "@/hooks/use-toast";
import Tooltip from "../tooltip";
import { Button } from "../ui/button";
import { router } from "next/client";
import { revalidatePath } from "next/cache";
type Props = {
/**
@ -32,6 +34,7 @@ export default function ClaimProfile({ playerId }: Props) {
title: "Profile Claimed",
description: "You have claimed this profile.",
});
revalidatePath("/player/[...slug]");
}
if (settings?.playerId == playerId || settings == undefined) {