mirror of
https://github.com/DeveloLongScript/MHSF.git
synced 2026-05-07 16:35:00 -05:00
fix: allowing players to own servesr you don't, client-side only
This commit is contained in:
parent
27d7f3755e
commit
d810a48dc8
@ -88,7 +88,7 @@ export default function ServerCustomize({
|
|||||||
c.servers.forEach((v) => {
|
c.servers.forEach((v) => {
|
||||||
setAuthor(v.author);
|
setAuthor(v.author);
|
||||||
if (v.name == server && isSignedIn) {
|
if (v.name == server && isSignedIn) {
|
||||||
if (user?.publicMetadata.player == v.author) {
|
if (user?.publicMetadata.player === v.author) {
|
||||||
setMinehutOwned(true);
|
setMinehutOwned(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
15
src/components/ui/skeleton.tsx
Normal file
15
src/components/ui/skeleton.tsx
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import { cn } from "@/lib/utils"
|
||||||
|
|
||||||
|
function Skeleton({
|
||||||
|
className,
|
||||||
|
...props
|
||||||
|
}: React.HTMLAttributes<HTMLDivElement>) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className={cn("animate-pulse rounded-md bg-primary/10", className)}
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export { Skeleton }
|
||||||
@ -272,7 +272,7 @@ export async function ownServer(server: string): Promise<boolean> {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.status == 400) {
|
if (response.status >= 400) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user