-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: lbac 1738 exposition pass (#828)
* feat: mix job description according to avail. data * fix: employerDescription is only matcha * fix: yarnlock & prettier * fix: open api schema * feat: extract constant
- Loading branch information
Showing
11 changed files
with
2,309 additions
and
1,866 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
ui/components/ItemDetail/MatchaComponents/MatchaCustomDescription.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { AddIcon, MinusIcon } from "@chakra-ui/icons" | ||
import { Accordion, AccordionButton, AccordionItem, AccordionPanel, Box } from "@chakra-ui/react" | ||
import DOMPurify from "isomorphic-dompurify" | ||
|
||
const MatchaCustomDescription = ({ data, title }: { data: string; title: string }) => { | ||
const sanitizedData = () => ({ | ||
__html: DOMPurify.sanitize(data), | ||
}) | ||
return ( | ||
<Accordion allowToggle> | ||
<AccordionItem> | ||
{({ isExpanded }) => ( | ||
<> | ||
<AccordionButton fontSize="1rem" fontWeight={700} color="#161616"> | ||
<Box as="span" flex="1" textAlign="left"> | ||
{title} | ||
</Box> | ||
{isExpanded ? <MinusIcon fontSize="10px" /> : <AddIcon fontSize="10px" />} | ||
</AccordionButton> | ||
|
||
<AccordionPanel pb={4}> | ||
<Box pl="12px" mt={4}> | ||
<div dangerouslySetInnerHTML={sanitizedData()} /> | ||
</Box> | ||
</AccordionPanel> | ||
</> | ||
)} | ||
</AccordionItem> | ||
</Accordion> | ||
) | ||
} | ||
|
||
export default MatchaCustomDescription |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.