Remove worker and change <a> to Link in auth

This commit is contained in:
Max Leiter 2022-03-06 16:53:39 -08:00
parent c34269400a
commit ed842bdc78
No known key found for this signature in database
GPG key ID: A3512F2F2F17EBDA
2 changed files with 3 additions and 22 deletions

View file

@ -1,5 +1,5 @@
import { FormEvent, useState } from 'react'
import { Button, Card, Input, Text } from '@geist-ui/core'
import { Button, Card, Input, Link, Text } from '@geist-ui/core'
import styles from './auth.module.css'
import { useRouter } from 'next/router'
@ -85,8 +85,8 @@ const Auth = ({ page }: { page: "signup" | "signin" }) => {
<Button type="success" ghost htmlType="submit">{signingIn ? 'Sign In' : 'Sign Up'}</Button>
</div>
<div className={styles.formGroup}>
{signingIn && <Text>Don&apos;t have an account? <a href="/signup" >Sign up</a></Text>}
{!signingIn && <Text>Already have an account? <a href="/signin" >Sign in</a></Text>}
{signingIn && <Text>Don&apos;t have an account? <Link color href="/signup" >Sign up</Link></Text>}
{!signingIn && <Text>Already have an account? <Link color href="/signin" >Sign in</Link></Text>}
</div>
{error && <Text type='error'>{error}</Text>}
</Card>

View file

@ -1,19 +0,0 @@
import { expose } from "comlink";
async function RemarkPipeline(disallowedElements, markdown) {
const markdownConverter = RemarkParseRemark()
.use([
RemarkParse,
...remarkPlugins,
[
RehypeUnwrap,
{ disallowedElements: disallowedElements, unwrapDisallowed: true },
],
])
.freeze();
const parsed = markdownConverter.parse(markdown);
const transformed = await markdownConverter.run(parsed);
return transformed;
}
expose(RemarkPipeline);