Skip to content

Request a happening only after whole app was loaded #56

@MilkeeyCat

Description

@MilkeeyCat

useEffect(() => {
const happeningId =
parseInt(searchParams.get('happeningId') || '0') || null;
if (happeningId) {
//TODO: check it only when all stuff is already loaded
if (!happening) {
getHappening(happeningId)
.unwrap()
.then((res) => {
if (res.status === 'success') {
dispatch(mergeHappenings([res.data]));
}
dispatch(
setHappeningInfoModalData({
happeningId: happeningId,
visible: true,
}),
);
});
}
}
}, [searchParams]);

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementProvides an enhancement to the websitefrontendRelated to frontend

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions