Language: TypeScript
Label: vulnerable
CWE: CWE-284 \u2014 Improper Access Control
The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.

Code:
    const clearEvent = () => {
        dispatch({ type: "event/dismiss" });
        dispatch({ type: "notification/dismiss" });
        setInputError({});
        setValueChangedOnce(true);
    };