chore: removed user guiding calls

This commit is contained in:
MiroslavDionisiev 2024-10-23 12:45:23 +03:00
parent ff9a54bfdd
commit 6a370ce0f1
2 changed files with 2 additions and 16 deletions

View file

@ -34,14 +34,13 @@ const thumbnailUrl = require('../../lib/user-thumbnail');
const FormsyProjectUpdater = require('./formsy-project-updater.jsx');
const EmailConfirmationModal = require('../../components/modal/email-confirmation/modal.jsx');
const EmailConfirmationBanner = require('../../components/dropdown-banner/email-confirmation/banner.jsx');
const {onCommented} = require('../../lib/user-guiding.js');
const queryString = require('query-string').default;
const projectShape = require('./projectshape.jsx').projectShape;
require('./preview.scss');
const frameless = require('../../lib/frameless');
const {useState, useCallback, useEffect} = require('react');
const {useState, useEffect} = require('react');
const ProjectJourney = require('../../components/journeys/project-journey/project-journey.jsx');
const {triggerAnalyticsEvent, onboardingEligibilityCheck} = require('../../lib/onboarding.js');
@ -150,7 +149,6 @@ const PreviewPresentation = ({
userOwnsProject,
visibilityInfo
}) => {
const [hasSubmittedComment, setHasSubmittedComment] = useState(false);
const [canViewProjectJourney, setCanViewProjectJourney] = useState(false);
const [shouldStopProject, setShouldStopProject] = useState(false);
useEffect(() => {
@ -233,14 +231,6 @@ const PreviewPresentation = ({
</FlexRow>
);
const onAddCommentWrapper = useCallback(body => {
onAddComment(body);
if (!hasSubmittedComment && user) {
setHasSubmittedComment(true);
onCommented(user.id, permissions);
}
}, [hasSubmittedComment, user]);
useEffect(() => {
if (canViewProjectJourney && projectInfo.title) {
triggerAnalyticsEvent({
@ -654,7 +644,7 @@ const PreviewPresentation = ({
isLoggedIn ? (
isShared && <ComposeComment
postURI={`/proxy/comments/project/${projectId}`}
onAddComment={onAddCommentWrapper}
onAddComment={onAddComment}
/>
) : (
/* TODO add box for signing in to leave a comment */

View file

@ -25,9 +25,6 @@ const ConnectedLogin = require('../../components/login/connected-login.jsx');
const CanceledDeletionModal = require('../../components/login/canceled-deletion-modal.jsx');
const NotAvailable = require('../../components/not-available/not-available.jsx');
const Meta = require('./meta.jsx');
const {
onProjectShared
} = require('../../lib/user-guiding.js');
const sessionActions = require('../../redux/session.js');
const {selectProjectCommentsGloballyEnabled, selectIsTotallyNormal} = require('../../redux/session');
@ -702,7 +699,6 @@ class Preview extends React.Component {
justRemixed: false,
justShared: true
});
onProjectShared(this.props.user.id, this.props.permissions);
}
handleShareAttempt () {
this.setState({