This file contains hidden or 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
| Verifying my Blockstack ID is secured with the address 16KyUebBPPXgQLvA1f51bpsne3gL7Emdrc https://explorer.blockstack.org/address/16KyUebBPPXgQLvA1f51bpsne3gL7Emdrc |
This file contains hidden or 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
| Verifying my Blockstack ID is secured with the address 1CiUwPYym8VKeKppDKSuRVRAyHNaJdySSG https://explorer.blockstack.org/address/1CiUwPYym8VKeKppDKSuRVRAyHNaJdySSG |
This file contains hidden or 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
| import { lookupProfile } from 'blockstack'; | |
| require('dotenv').config() | |
| const config = require('./config.json'); | |
| const request = require('request-promise'); | |
| const { InstanceDataStore } = require('blockstack/lib/auth/sessionStore'); | |
| const { connectToGaiaHub } = require('blockstack/lib/storage/hub'); | |
| const { AppConfig, UserSession } = require('blockstack'); | |
| let idAddress; | |
| let configObj; |
This file contains hidden or 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
| import Head from "next/head"; | |
| import Link from "next/link"; | |
| import Image from "next/image"; | |
| export default function Home() { | |
| return ( | |
| <div> | |
| <Head> | |
| <title>Pinnie For Your Thoughts</title> | |
| <link rel="icon" href="/pinnie.svg" /> |
This file contains hidden or 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
| const styles = { | |
| header: { | |
| display: "flex", | |
| flexDirection: "row", | |
| width: "100vw", | |
| justifyContent: "flex-end", | |
| paddingRight: "10px", | |
| paddingTop: 10, | |
| }, | |
| flex: { |
This file contains hidden or 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
| import React, { useState, useEffect } from "react"; | |
| import ReactMarkdown from "react-markdown"; | |
| import axios from "axios"; | |
| import { useRouter } from "next/router"; | |
| import Link from "next/link"; | |
| const Sample = () => { | |
| const [content, setContent] = useState(null); | |
| const router = useRouter(); | |
| const { sid } = router.query; |
This file contains hidden or 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
| const handleSubscribe = async (e) => { | |
| e.preventDefault(); | |
| try { | |
| await subscribe(email); | |
| setSuccessMessage("Check your email to continue!"); | |
| setEmail(""); | |
| } catch (error) { | |
| setError(error.message); | |
| } | |
| } |
This file contains hidden or 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
| <div style={styles.flexRow}> | |
| <form onSubmit={handleSubscribe}> | |
| <input | |
| style={styles.input} | |
| onChange={(e) => setEmail(e.target.value)} | |
| value={email} | |
| type="email" | |
| placeholder="Type your email" | |
| /> | |
| <button type="submit" style={styles.btn}> |
This file contains hidden or 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
| import axios from "axios"; | |
| import jwt from "jsonwebtoken"; | |
| const sgMail = require('@sendgrid/mail'); | |
| sgMail.setApiKey("SENDGRID API KEY"); | |
| const SECRET = "MY SUPER SECRET SIGNING KEY"; | |
| const config = { | |
| headers: { | |
| Authorization: | |
| "Bearer PINATA JWT", | |
| "Content-Type": "application/json", |
This file contains hidden or 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
| import { checkSubscriptions, createJWT, sendEmail } from "./subscribe"; | |
| export default async (req, res) => { | |
| try { | |
| // Check for existing subscription | |
| const existingSubscription = await checkSubscriptions(req.body.email); | |
| if (!existingSubscription) { | |
| return res.status(400).send("User is not subscribed"); | |
| } |
OlderNewer