Skip to content

Commit

Permalink
Removed unnecessary db file and unnecessary refresh.
Browse files Browse the repository at this point in the history
  • Loading branch information
ocielliottc committed Dec 20, 2024
1 parent 9162839 commit 3dd68a3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.

This file was deleted.

6 changes: 1 addition & 5 deletions web-ui/src/pages/PulsePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const PulsePage = () => {
const { state } = useContext(AppContext);
const currentUser = selectCurrentUser(state);
const csrf = selectCsrfToken(state);
const history = useHistory();

const [externalComment, setExternalComment] = useState('');
const [externalScore, setExternalScore] = useState(center);
Expand Down Expand Up @@ -102,12 +101,9 @@ const PulsePage = () => {
const res = await initiate(pulseURL, csrf, data);
if (res.error) return;

setSubmittedToday(true);
if (submitAnonymously) {
setSubmittedToday(true);
Cookies.set(cookieName, 'true', { expires: 1 });
} else {
// Refresh browser to show that pulses where already submitted today.
history.go(0);
}
};

Expand Down

0 comments on commit 3dd68a3

Please sign in to comment.