♻️(frontend) extract query key in a variable

I'll need this key to sync data when the mutation responds successfully.
This is a preliminary refactoring; the mutation will be added
in upcoming commits.
This commit is contained in:
lebaudantoine
2024-08-04 17:40:26 +02:00
committed by aleb_the_flash
parent 23a2d3bcac
commit b529e9c848

View File

@@ -26,8 +26,9 @@ export const Conference = ({
mode?: 'join' | 'create'
initialRoomData?: ApiRoom
}) => {
const fetchKey = [keys.room, roomId, userConfig.username]
const { status, data } = useQuery({
queryKey: [keys.room, roomId, userConfig.username],
queryKey: fetchKey,
enabled: !initialRoomData,
initialData: initialRoomData,
queryFn: () =>