This file contains 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 from 'react' | |
import TopNav from "./TopNav"; | |
import Inbox from "./Inbox"; | |
const AppContainer = () => { | |
return ( | |
<div> | |
<TopNav /> | |
<Inbox /> | |
</div> |
This file contains 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 } from "react"; | |
const Email = ({ email, emails, loadEmails }) => { | |
const [showFullEmail, setShowFullEmail] = useState(false); | |
const replaceWithBr = () => { | |
return email.text.replace(/\n/g, "<br />"); | |
}; | |
const toggleEmail = () => { |
This file contains 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, { useEffect, useState } from "react"; | |
import Email from "./Email"; | |
import axios from "axios"; | |
const Inbox = () => { | |
const [emails, setEmails] = useState([]); | |
const [unread, setUnreadCount] = useState(0); | |
const [loading, setLoading] = useState(false); | |
// Swipe pull down check code from https://stackoverflow.com/a/46248086 |
This file contains 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 from "react"; | |
const InstallScreen = () => { | |
return ( | |
<div className="flex-container"> | |
<h1>Welcome to Appjections!</h1> | |
<h3> | |
Install the app and start experiencing the best app rejection emails | |
AI could ever write. | |
</h3> |
This file contains 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, { useEffect, useState } from 'react' | |
import InstallScreen from "./InstallScreen"; | |
import AppContainer from "./AppContainer"; | |
const MobileView = () => { | |
const [standaloneMode, setStandaloneMode] = useState(false); | |
useEffect(() => { | |
let standalone = false; | |
if (window.matchMedia("(display-mode: standalone)").matches) { | |
standalone = true; |
This file contains 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 from "react"; | |
const DesktopView = () => { | |
return ( | |
<div className="flex-container"> | |
<h1>Install Appjections today!</h1> | |
<p> | |
From any mobile device, visit this same page to install and experience | |
Appjections. Don't let your app rejection emails wait any longer. | |
Install today and feel the pain of not getting you app approved. |
This file contains 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, { useEffect, useState } from "react"; | |
import "./App.css"; | |
import MobileView from "./components/MobileView"; | |
import DesktopView from "./components/DesktopView"; | |
function App() { | |
const [mobile, setMobile] = useState(true); | |
useEffect(() => { | |
const isMobile = () => | |
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( |
This file contains 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
require("dotenv"); | |
const axios = require("axios"); | |
exports.handler = async (event, context) => { | |
try { | |
const totalEmailsToFetch = Math.floor(Math.random() * 3) + 1 | |
const data = JSON.stringify({ | |
model: "text-davinci-002", | |
prompt: "Write a funny email rejection from a mobile App Marketplace that gives a silly reason for the app's rejection.", | |
temperature: 0.7, |
This file contains 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
<style type="text/css"> | |
body { | |
max-width: 85%; | |
margin: auto; | |
} | |
iframe { | |
width: 100%; | |
height: 100vh; | |
} | |
#locked { |
NewerOlder