♻️(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:
committed by
aleb_the_flash
parent
23a2d3bcac
commit
b529e9c848
@@ -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: () =>
|
||||
|
||||
Reference in New Issue
Block a user