mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-12 10:35:51 +00:00
fix(tutorial): skip getting steps if there is no user (#6786)
This commit is contained in:
parent
9716a49067
commit
d48e44499e
@ -9,7 +9,7 @@ import { CURRENT_ONBOARDING_IDS } from '../app/onboarding/OnboardingConfig';
|
||||
export function EducationStepsProvider({ children }: { children: React.ReactNode }) {
|
||||
const userUrn = useGetAuthenticatedUser()?.corpUser.urn;
|
||||
const stepIds = getStepIds(userUrn || '');
|
||||
const { data } = useBatchGetStepStatesQuery({ variables: { input: { ids: stepIds } } });
|
||||
const { data } = useBatchGetStepStatesQuery({ skip: !userUrn, variables: { input: { ids: stepIds } } });
|
||||
const results = data?.batchGetStepStates.results;
|
||||
const [educationSteps, setEducationSteps] = useState<StepStateResult[] | null>(results || null);
|
||||
const [educationStepIdsAllowlist, setEducationStepIdsAllowlist] = useState<Set<string>>(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user