Revert "Migrate to stitches 1.0.0, fix a few bugs"
This reverts commit fea9e727fd
.
This commit is contained in:
parent
24e9be73cc
commit
35253348d2
9 changed files with 23 additions and 23 deletions
|
@ -23,7 +23,7 @@
|
|||
"@sentry/react": "^6.12.0",
|
||||
"@sentry/tracing": "^6.12.0",
|
||||
"@sentry/webpack-plugin": "^1.17.1",
|
||||
"@stitches/react": "^1.0.0",
|
||||
"@stitches/react": "^0.2.3",
|
||||
"@tldraw/tldraw": "^0.0.57",
|
||||
"browser-fs-access": "^0.20.4",
|
||||
"gtag": "^1.0.1",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import NextDocument, { Html, Head, Main, NextScript, DocumentContext } from 'next/document'
|
||||
import { getCssText } from '-styles'
|
||||
import { getCssString } from 'styles'
|
||||
import { GA_TRACKING_ID } from '-utils/gtag'
|
||||
|
||||
class MyDocument extends NextDocument {
|
||||
|
@ -11,7 +11,7 @@ class MyDocument extends NextDocument {
|
|||
styles: (
|
||||
<>
|
||||
{initialProps.styles}
|
||||
<style id="stitches" dangerouslySetInnerHTML={{ __html: getCssText() }} />
|
||||
<style id="stitches" dangerouslySetInnerHTML={{ __html: getCssString() }} />
|
||||
</>
|
||||
),
|
||||
}
|
||||
|
|
|
@ -18,18 +18,14 @@ export default function Auth(
|
|||
async redirect(url, baseUrl) {
|
||||
return baseUrl
|
||||
},
|
||||
async signIn(user, account, profile) {
|
||||
const login = profile?.login as string
|
||||
async signIn(user, account, profile: any) {
|
||||
const canLogin = await isSponsoringMe(profile?.login)
|
||||
|
||||
if (login) {
|
||||
const canLogin = await isSponsoringMe(login)
|
||||
|
||||
if (canLogin) {
|
||||
return canLogin
|
||||
}
|
||||
if (canLogin) {
|
||||
return canLogin
|
||||
} else {
|
||||
return '/sponsorware'
|
||||
}
|
||||
|
||||
return '/sponsorware'
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import styled from '-styles'
|
||||
import { getSession, signin, signout, useSession } from 'next-auth/client'
|
||||
import type { GetServerSideProps } from 'next'
|
||||
import Link from 'next/link'
|
||||
import React from 'react'
|
||||
|
||||
export default function Sponsorware(): JSX.Element {
|
||||
|
@ -16,8 +15,8 @@ export default function Sponsorware(): JSX.Element {
|
|||
>
|
||||
<h1>tldraw (is sponsorware)</h1>
|
||||
<p>
|
||||
Hey, thanks for visiting <Link href="https://tldraw.com/">tldraw</Link>, a tiny little
|
||||
drawing app by <a href="https://twitter.com/steveruizok">steveruizok</a>.
|
||||
Hey, thanks for visiting <a href="https://tldraw.com/">tldraw</a>, a tiny little drawing
|
||||
app by <a href="https://twitter.com/steveruizok">steveruizok</a>.
|
||||
</p>
|
||||
<video autoPlay muted playsInline onClick={(e) => e.currentTarget.play()}>
|
||||
<source src="images/hello.mp4" type="video/mp4" />
|
||||
|
@ -48,7 +47,7 @@ export default function Sponsorware(): JSX.Element {
|
|||
Signed in as {session?.user?.name} ({session?.user?.email}), but it looks like
|
||||
you're not yet a sponsor.
|
||||
<br />
|
||||
Something wrong? Try <Link href="/">reloading the page</Link> or DM me on{' '}
|
||||
Something wrong? Try <a href="/">reloading the page</a> or DM me on{' '}
|
||||
<a href="https://twitter.com/steveruizok">Twitter</a>.
|
||||
</Detail>
|
||||
</>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
import { createStitches, defaultThemeMap } from '@stitches/react'
|
||||
import { createCss, defaultThemeMap } from '@stitches/react'
|
||||
|
||||
const { styled, css, createTheme, getCssText } = createStitches({
|
||||
const { styled, css, theme, getCssString } = createCss({
|
||||
themeMap: {
|
||||
...defaultThemeMap,
|
||||
},
|
||||
|
@ -99,7 +99,7 @@ const { styled, css, createTheme, getCssText } = createStitches({
|
|||
},
|
||||
})
|
||||
|
||||
const dark = createTheme({
|
||||
const dark = theme({
|
||||
colors: {
|
||||
brushFill: 'rgba(180, 180, 180, .05)',
|
||||
brushStroke: 'rgba(180, 180, 180, .25)',
|
||||
|
@ -136,4 +136,4 @@ const dark = createTheme({
|
|||
|
||||
export default styled
|
||||
|
||||
export { css, getCssText, dark }
|
||||
export { css, getCssString, dark }
|
||||
|
|
|
@ -3196,6 +3196,11 @@
|
|||
resolved "https://registry.yarnpkg.com/@sqltools/formatter/-/formatter-1.2.3.tgz#1185726610acc37317ddab11c3c7f9066966bd20"
|
||||
integrity sha512-O3uyB/JbkAEMZaP3YqyHH7TMnex7tWyCbCI4EfJdOCoN6HIhqdJBWTM6aCCiWQ/5f5wxjgU735QAIpJbjDvmzg==
|
||||
|
||||
"@stitches/react@^0.2.3":
|
||||
version "0.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@stitches/react/-/react-0.2.5.tgz#ad15b4e59ac2a0679542ba002d41253244be7dab"
|
||||
integrity sha512-RDVn89kW0R/M4q4TdYvsJ7nckFndzRWGGFJnEHbIH9flOpahtNdPsrxVSsZSjFpxeVqCoOxKujlQjiyRrec1VA==
|
||||
|
||||
"@stitches/react@^1.0.0":
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@stitches/react/-/react-1.0.0.tgz#311413630d96a627ca28f44ebcc9179455cdb73a"
|
||||
|
|
Loading…
Reference in a new issue