1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-29 20:06:00 -04:00

more sensical twemoji-in-js w/ svgr

This commit is contained in:
2021-12-11 08:47:13 -05:00
parent daffcb924b
commit 8fe68b009b
6 changed files with 193 additions and 32 deletions
+4 -4
View File
@@ -2,10 +2,10 @@ import "vanilla-hcaptcha";
import { h, render } from "preact";
import { useState } from "preact/hooks";
import fetch from "unfetch";
import parseEmoji from "./emoji.js";
// shared react components:
import { CheckIcon, XIcon } from "@primer/octicons-react";
import SendEmoji from "twemoji-emojis/vendor/svg/1f4e4.svg";
const CONTACT_ENDPOINT = "/api/contact/";
@@ -124,9 +124,9 @@ const ContactForm = () => {
aria-label="Send Message"
disabled={sending}
style={{ display: status.success ? "none" : null }}
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: parseEmoji(sending ? "Sending..." : "📤 Send") }}
/>
>
<SendEmoji class="emoji" /> {sending ? "Sending..." : "Send"}
</button>
<span
class="contact-form-result"