Download survey_apps/main_study/src/components/ThankYouScreen.js from sciminds/same-words-different-judgements: direct link, hf CLI and curl.
- Browser
- Download file 744 Bytes
-
https://huggingface.co/datasets/sciminds/same-words-different-judgements/resolve/main/survey_apps/main_study/src/components/ThankYouScreen.js
- Command line
-
hf download hf://datasets/sciminds/same-words-different-judgements/survey_apps/main_study/src/components/ThankYouScreen.js
-
curl -L -o ThankYouScreen.js https://huggingface.co/datasets/sciminds/same-words-different-judgements/resolve/main/survey_apps/main_study/src/components/ThankYouScreen.js
744 Bytes
| import { useEffect } from "react"; | |
| // `redirectURL` is a fully-formed URL (e.g. a Prolific completion link) | |
| // or null. When null, the app stays on the thank-you screen. | |
| function ThankYouScreen({ message = "Thank you for your time!", redirectURL = null }) { | |
| useEffect(() => { | |
| if (redirectURL) { | |
| const timer = setTimeout(() => { | |
| window.location.href = redirectURL; | |
| }, 3000); | |
| return () => clearTimeout(timer); | |
| } | |
| }, [redirectURL]); | |
| return ( | |
| <div style={{ padding: "2rem", textAlign: "center" }}> | |
| <h2>{message}</h2> | |
| {redirectURL ? ( | |
| <p>Redirecting in 3 seconds…</p> | |
| ) : ( | |
| <p>You may now close this tab.</p> | |
| )} | |
| </div> | |
| ); | |
| } | |
| export default ThankYouScreen; | |