Replug SAML configurations

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2025-12-24 11:15:31 +01:00
committed by Bryan Frimin
parent 600d763d18
commit b012b5ec42
24 changed files with 2230 additions and 121 deletions

View File

@@ -0,0 +1,18 @@
import { useRef, useState } from "react";
export function useCopy(): [boolean, (value: string) => void] {
const [copiedValue, setCopiedValue] = useState<string>();
const lastCopiedValueRef = useRef<string>("");
const handleCopy = (value: string) => {
lastCopiedValueRef.current = value;
navigator.clipboard.writeText(value);
setCopiedValue(value);
setTimeout(() => {
setCopiedValue(undefined);
lastCopiedValueRef.current = "";
}, 2000);
};
return [copiedValue === lastCopiedValueRef.current, handleCopy];
}