Add dashboard UI source and track it in the repository.
Expose the Vite/React website source under dashboard/ (with node_modules still ignored) so the full dashboard can be built and maintained from this repo.
This commit is contained in:
1 parent
e97e281bda
commit
b82f69783d
117 files changed
+18615
-3
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { useEffect, useRef, type ForwardedRef } from "react";
|
||||
|
||||
export function useForwardedRef<T>(forwardedRef: ForwardedRef<T>) {
|
||||
const innerRef = useRef<T>(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (!forwardedRef) return;
|
||||
if (typeof forwardedRef === "function") {
|
||||
forwardedRef(innerRef.current);
|
||||
} else {
|
||||
forwardedRef.current = innerRef.current;
|
||||
}
|
||||
});
|
||||
|
||||
return innerRef;
|
||||
}
|
||||
Reference in new issue
Block a user