Skip to content

Commit

Permalink
Merge pull request #10 from BigWhaleLabs/id-twitter
Browse files Browse the repository at this point in the history
Id twitter
  • Loading branch information
T-Damer authored Nov 15, 2023
2 parents 0b99eb2 + 0a0ce99 commit 01afde0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@big-whale-labs/ketl-email",
"version": "0.4.0",
"version": "0.4.2",
"license": "MIT",
"files": [
"dist"
Expand All @@ -13,7 +13,7 @@
"pretty": "prettier --check 'src/**/*.ts'",
"update": "yarn build && git add . && git commit -m 'update' && git push",
"lint": "yarn pretty && eslint --max-warnings 0 ./src/",
"release": "np",
"release": "np && git push",
"prepublishOnly": "yarn build"
},
"eslintConfig": {
Expand Down
10 changes: 5 additions & 5 deletions src/components/InviteCode/InviteCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import openKetlInviteCode from '../../helpers/openKetlInviteCode'
import values from '../../styles/values'

export default function InviteCard({
id,
idEmail,
idTwitter,
inviteCode,
twitterMetadata,
value,
}: InviteCodeProps) {
const ketlLinkToVerification = id
? openKetlWaitlistPassed({ id, inviteCode })
const ketlLinkToVerification = idEmail
? openKetlWaitlistPassed({ id: idEmail, inviteCode })
: openKetlInviteCode({ email: value, inviteCode })

return (
Expand Down Expand Up @@ -61,7 +61,7 @@ export default function InviteCard({
(<strong>DO NOT</strong> Screenshot or share your invite code with
anyone else)
</MjmlText>
{!!twitterMetadata && !!id && <TwitterBlock id={id} />}
{!!idTwitter && <TwitterBlock id={idTwitter} />}
</Card>
)
}
4 changes: 2 additions & 2 deletions src/layouts/inviteCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export interface InviteCodeProps {
attestationType?: AttestationType
inviteCode: string
value: string
twitterMetadata?: { username: string; id: string }
id?: string
idEmail: string
idTwitter?: string
}

const headerText = (
Expand Down
7 changes: 4 additions & 3 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const exampleInviteCode =
'0000000000000000000000000000000000000000000000000000000000000000000000000000:0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
const attestationType = AttestationType.Founder
const ketlXyzTwitter = { id: '1435733105554321409', username: 'ketlxyz' }
const exampleId = 'Qtqf3G35dpfXtoqCvQ45DphEmEco5sKc'
const exampleIdEmail = ''
const exampleIdTwitter = 'Qtqf3G35dpfXtoqCvQ45DphEmEco5sKc'

app.get('/waitlist', (_, res) => {
const { html } = waitlistInfo({
Expand All @@ -30,9 +31,9 @@ app.get('/waitlist', (_, res) => {
app.get('*', (_, res) => {
const emailExample = inviteCode({
attestationType,
id: exampleId,
idEmail: exampleIdEmail,
idTwitter: exampleIdTwitter,
inviteCode: exampleInviteCode,
twitterMetadata: ketlXyzTwitter,
value: env.TEST_EMAIL,
})
const { html } = emailExample
Expand Down

0 comments on commit 01afde0

Please sign in to comment.