Skip to content

Commit

Permalink
feat(openalex): Add intro.js on results page
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Dec 11, 2024
1 parent f944e8d commit 78ae49e
Show file tree
Hide file tree
Showing 4 changed files with 408 additions and 351 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import { useSearchParams } from 'react-router-dom';
import ButtonDropdown from '../../../components/button-dropdown';

export default function ExportErrorsButton({
className,
corrections,
}) {
const [searchParams] = useSearchParams();

return (
<ButtonDropdown
className="fr-mr-1w"
className={`fr-mr-1w ${className}`}
data={corrections}
label="OpenAlex corrections"
searchParams={searchParams}
Expand All @@ -19,6 +20,7 @@ export default function ExportErrorsButton({
}

ExportErrorsButton.propTypes = {
className: PropTypes.string,
corrections: PropTypes.arrayOf(PropTypes.shape({
addList: PropTypes.arrayOf(PropTypes.string).isRequired,
hasCorrection: PropTypes.bool.isRequired,
Expand Down Expand Up @@ -48,3 +50,7 @@ ExportErrorsButton.propTypes = {
worksOpenAlex: PropTypes.arrayOf(PropTypes.string).isRequired,
})).isRequired,
};

ExportErrorsButton.defaultProps = {
className: '',
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import useToast from '../../../hooks/useToast';

const { VITE_WS_HOST } = import.meta.env;

export default function SendFeedbackButton({ corrections, resetCorrections }) {
export default function SendFeedbackButton({ className, corrections, resetCorrections }) {
const [isModalOpen, setIsModalOpen] = useState(false);
const [userEmail, setUserEmail] = useState(null);
const [validEmail, setValidEmail] = useState(null);
Expand Down Expand Up @@ -70,6 +70,7 @@ export default function SendFeedbackButton({ corrections, resetCorrections }) {
<>
<Button
aria-label="Send feedback to OpenAlex"
className={className}
color="blue-ecume"
disabled={!corrections.length > 0}
icon="send-plane-fill"
Expand Down Expand Up @@ -108,6 +109,7 @@ export default function SendFeedbackButton({ corrections, resetCorrections }) {
}

SendFeedbackButton.propTypes = {
className: PropTypes.string,
corrections: PropTypes.arrayOf(PropTypes.shape({
addList: PropTypes.arrayOf(PropTypes.string).isRequired,
hasCorrection: PropTypes.bool.isRequired,
Expand Down Expand Up @@ -138,3 +140,7 @@ SendFeedbackButton.propTypes = {
})).isRequired,
resetCorrections: PropTypes.func.isRequired,
};

SendFeedbackButton.defaultProps = {
className: '',
};
Loading

0 comments on commit 78ae49e

Please sign in to comment.