aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/FormListing.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components/FormListing.tsx b/src/components/FormListing.tsx
index 2493608..c53cf67 100644
--- a/src/components/FormListing.tsx
+++ b/src/components/FormListing.tsx
@@ -9,15 +9,15 @@ import Tag from "./Tag";
import colors from "../colors";
-import { AllFormsForm } from "../api/forms";
+import { Form, FormFeatures } from "../api/forms";
interface FormListingProps {
- form: AllFormsForm
+ form: Form
}
function FormListing({ form }: FormListingProps) {
const listingStyle = css`
- background-color: ${form.open ? colors.success : colors.darkButNotBlack};
+ background-color: ${form.features.includes(FormFeatures.Open) ? colors.success : colors.darkButNotBlack};
width: 60%;
padding: 20px;
margin-top: 20px;
@@ -39,13 +39,13 @@ function FormListing({ form }: FormListingProps) {
let closedTag;
- if (!form.open) {
+ if (!form.features.includes(FormFeatures.Open)) {
closedTag = <Tag text="CLOSED" color={colors.error}/>
};
return <Link to={`/form/${form.id}`} css={listingStyle}>
<div>
- <h3 css={{fontSize: "1.5em", marginBottom: "0"}}>{closedTag}{form.title} <FontAwesomeIcon icon={faArrowRight} css={{fontSize: "0.75em", paddingBottom: "1px"}}/></h3>
+ <h3 css={{fontSize: "1.5em", marginBottom: "0"}}>{closedTag}{form.name} <FontAwesomeIcon icon={faArrowRight} css={{fontSize: "0.75em", paddingBottom: "1px"}}/></h3>
<p css={{marginTop: "5px"}}>{form.description}</p>
</div>
</Link>