diff --git a/src/components/Card.tsx b/src/components/Card.tsx index 733a870..bb2b472 100644 --- a/src/components/Card.tsx +++ b/src/components/Card.tsx @@ -14,14 +14,6 @@ interface WrappedCardProps { buttonOnClick?: () => void; } -interface CardProps { - title: string; - start_time: string; - text: string; - img: JSX.Element; - button: JSX.Element; -} - const StyledCard = styled.article` color: ${colors.black}; margin: 1rem; @@ -73,17 +65,7 @@ const StyledCard = styled.article` } `; -const Card: React.FC = ({ title, start_time, text, img, button }) => ( - - {img} -

{start_time}

-

{title}

-

{text}

- {button} -
-); - -const WrappedCard: React.FC = ({ title, text, link, image, imageAlt, start_time, buttonOnClick }) => { +const WrappedCard: React.FC = ({ title, text, link, image, imageAlt, start_time, buttonOnClick, ...props }) => { const options = { day: "numeric", month: "numeric", @@ -105,13 +87,13 @@ const WrappedCard: React.FC = ({ title, text, link, image, ima ); return ( - + + {img} +

{datetime}

+

{title}

+

{text}

+ {button} +
); } diff --git a/src/components/Widgets/SignupQuestionsWidget/QuestionList.tsx b/src/components/Widgets/SignupQuestionsWidget/QuestionList.tsx index 079a290..2229f99 100644 --- a/src/components/Widgets/SignupQuestionsWidget/QuestionList.tsx +++ b/src/components/Widgets/SignupQuestionsWidget/QuestionList.tsx @@ -77,7 +77,7 @@ class QuestionList extends React.Component const { placeholder, innerRef } = this.props; return ( -
+
{this.renderQuestions()} {placeholder}
diff --git a/src/components/Widgets/SignupQuestionsWidget/SignupQuestionsWidget.tsx b/src/components/Widgets/SignupQuestionsWidget/SignupQuestionsWidget.tsx index e850309..3798f6e 100644 --- a/src/components/Widgets/SignupQuestionsWidget/SignupQuestionsWidget.tsx +++ b/src/components/Widgets/SignupQuestionsWidget/SignupQuestionsWidget.tsx @@ -87,7 +87,7 @@ const SignupQuestionsWidget: React.FC = ({ value, on )} - + New Question diff --git a/src/pages/admin/signups/index.tsx b/src/pages/admin/signups/index.tsx index edf66d7..c7e70c0 100644 --- a/src/pages/admin/signups/index.tsx +++ b/src/pages/admin/signups/index.tsx @@ -53,7 +53,7 @@ const AdminSignupPage: React.FC = () => {

Sign-up forms

- + {renderData(forms)} ); diff --git a/src/views/FrontPage/FrontPageView.tsx b/src/views/FrontPage/FrontPageView.tsx index e951da1..77a837f 100644 --- a/src/views/FrontPage/FrontPageView.tsx +++ b/src/views/FrontPage/FrontPageView.tsx @@ -71,6 +71,7 @@ const FrontPageView: React.FC = ({ events, feed }) => ( link={`/events/${event.id}`} image={event.image || event.tags[0].icon} buttonOnClick={noop} + data-e2e="event-card" /> ))}