Discord Permissions will be revoked, when under a penalty
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
import { ReactNode, useState } from "react";
|
||||
import { cn } from "../helper/cn";
|
||||
import { Button } from "./Button";
|
||||
|
||||
export const PenaltyDropdown = ({
|
||||
onClick,
|
||||
@@ -79,10 +80,10 @@ export const PenaltyDropdown = ({
|
||||
<option value="1y">1 Jahr</option>
|
||||
</select>
|
||||
)}
|
||||
<button
|
||||
<Button
|
||||
className={cn("btn btn-square btn-soft tooltip tooltip-bottom w-full", btnClassName)}
|
||||
data-tip={btnTip}
|
||||
onClick={() => {
|
||||
onClick={async () => {
|
||||
let untilDate: Date | null = null;
|
||||
if (until !== "default") {
|
||||
const now = new Date();
|
||||
@@ -124,11 +125,11 @@ export const PenaltyDropdown = ({
|
||||
untilDate = null;
|
||||
}
|
||||
}
|
||||
onClick({ reason, until: untilDate });
|
||||
await onClick({ reason, until: untilDate });
|
||||
}}
|
||||
>
|
||||
{Icon} {btnName}
|
||||
</button>
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user