feat(user-models): clickable model card opens API access info

This commit is contained in:
jialin
2026-07-09 20:36:52 +08:00
committed by jialin
parent 794ac724ca
commit dc54c21d70
3 changed files with 136 additions and 85 deletions
@@ -0,0 +1,30 @@
import { useState } from 'react';
const useViewApIInfo = () => {
const [apiAccessInfo, setAPIAccessInfo] = useState<any>({
show: false,
data: {}
});
const openViewAPIInfo = (row: any) => {
setAPIAccessInfo({
show: true,
data: row
});
};
const closeViewAPIInfo = () => {
setAPIAccessInfo({
show: false,
data: {}
});
};
return {
apiAccessInfo,
openViewAPIInfo,
closeViewAPIInfo
};
};
export default useViewApIInfo;