|
1 | 1 | import React, { createContext, useContext, useEffect, useState, useCallback, useMemo } from 'react';
|
2 |
| -import {Box, Skeleton, Scrollable, Margins, InputBox} from '@rocket.chat/fuselage'; |
| 2 | +import { Box, Skeleton, Scrollable, Margins, InputBox } from '@rocket.chat/fuselage'; |
3 | 3 |
|
4 | 4 | import { useRouteParameter, useRoute } from '../../../../../client/contexts/RouterContext';
|
5 | 5 | import InviteStepperPage from './InviteStepperPage';
|
@@ -45,10 +45,10 @@ function InvitePageState() {
|
45 | 45 | const [currentStep, setCurrentStep, councilId] = useStepRouting();
|
46 | 46 |
|
47 | 47 | const query = useMemo(() => ({
|
48 |
| - query: JSON.stringify({ _id: councilId }), |
| 48 | + query: JSON.stringify({ inviteLink: councilId }), |
49 | 49 | }), [councilId]);
|
50 | 50 |
|
51 |
| - const { data, state, error } = useEndpointDataExperimental('councils.getOne', query); |
| 51 | + const { data, state, error } = useEndpointDataExperimental('councils.getOneByInviteLink', query); |
52 | 52 |
|
53 | 53 | const goToPreviousStep = useCallback(() => setCurrentStep((currentStep) => (currentStep !== 1 ? currentStep - 1 : currentStep)), []);
|
54 | 54 | const goToNextStep = useCallback(() => setCurrentStep((currentStep) => currentStep + 1), []);
|
@@ -88,7 +88,7 @@ function InvitePageState() {
|
88 | 88 |
|
89 | 89 |
|
90 | 90 | return <InvitePageContext.Provider value={value}>
|
91 |
| - <InviteStepperPage currentStep={currentStep}/> |
| 91 | + <InviteStepperPage currentStep={currentStep} council={data}/> |
92 | 92 | </InvitePageContext.Provider>;
|
93 | 93 | }
|
94 | 94 |
|
|
0 commit comments