mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-13 18:52:14 +01:00
update query keys to include org id, preventing stale data after organization switch
This commit is contained in:
@@ -8,7 +8,7 @@ export function useProjectsQuery() {
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
const query = useQuery({
|
||||
queryKey: ['projects'],
|
||||
queryKey: computed(() => ['projects', getCurrentOrganizationId()]),
|
||||
queryFn: async () => {
|
||||
const organizationId = getCurrentOrganizationId();
|
||||
if (!organizationId) throw new Error('No organization');
|
||||
|
||||
Reference in New Issue
Block a user