mirror of
https://github.com/khairul169/vaulterm.git
synced 2026-09-15 17:03:30 +07:00
feat: add tags
This commit is contained in:
@@ -66,3 +66,17 @@ export const useMoveHost = () => {
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
export const useTags = () => {
|
||||
const teamId = useTeamId();
|
||||
return useQuery({
|
||||
queryKey: ["hosts/tags", teamId],
|
||||
queryFn: () => api("/hosts/tags", { params: { teamId } }),
|
||||
select: (data) => {
|
||||
return data?.rows?.map((row: any) => ({
|
||||
label: row.name,
|
||||
value: row.name,
|
||||
}));
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user