import { Link } from "../routes"; import Head from "../components/head"; import Nav from "../components/nav"; import withRedux from "next-redux-wrapper"; import Header from "../components/Header"; import Button from "../components/Button"; import cookies from "next-cookies"; import Text from "../components/Text"; import _ from "lodash"; import { updateEntities, setCurrentUser, initStore } from "../redux/store"; import { getFeaturedProfiles, getCurrentUser } from "../api"; import { bindActionCreators } from "redux"; import { Router } from "../routes"; import PageFooter from "../components/PageFooter"; import withLogin from "../lib/withLogin"; import qs from "qs"; import LazyLoad from "react-lazyload"; import { buildImgSrcSet } from "../lib/imgUri"; import { buildProfileURL } from "../lib/routeHelpers"; import LoginGate, { LOGIN_STATUSES } from "../components/LoginGate"; import Divider from "../components/Divider"; import { SPACING } from "../helpers/styles"; // This is not saved in git 150x over because I don't want this repo to be huge. (function () { const FeaturedProfile = ({ profile }) => { return (
{profile.name}
{(profile.tagline || "").substr(0, 100)}
); }; class SignupForm extends React.Component { constructor(props) { super(props); this.state = { email: this.props.email || "", }; } setEmail = evt => this.setState({ email: evt.target.value }); componentDidMount() { Router.prefetchRoute(`/sign-up/verify`); } handleSubmit = evt => { evt.preventDefault(); Router.pushRoute(`/sign-up/verify?${qs.stringify({ email: this.state.email })}`); }; render() { return (
); } } class Homepage extends React.Component { constructor(props) { super(props); this.state = { isLoadingProfiles: true, profiles: [], }; } static async getInitialProps(ctx) { if (ctx.isServer && ctx.req.path === "/") { const { currentUserId } = cookies(ctx); if (currentUserId) { ctx.res.writeHead(302, { Location: `${process.env.DOMAIN}/welcome`, }); ctx.res.end(); ctx.res.finished = true; } } } async componentDidMount() { const profileResponse = await getFeaturedProfiles(); this.props.updateEntities(profileResponse.body); this.setState({ isLoadingProfiles: false, profiles: profileResponse.body.data, }); Router.prefetchRoute(`/lucy`); } render() { return (
Your own game of The Bachelor(ette)
Create a page where people apply to go on a date with you. You pick the winners.
{!this.props.currentUserId && }
Featured pages
{this.state.isLoadingProfiles &&
}
{!_.isEmpty(this.state.profiles) && this.state.profiles.map(profile => )}
); } } const HomepageWithStore = withRedux(initStore, null, dispatch => bindActionCreators({ updateEntities, setCurrentUser }, dispatch), )(LoginGate(Homepage)); })(); l'>repl Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-07-05[bun-framework-next] BumpGravatar Jarred Sumner 4-5/+5
2022-07-05Clean up some benchmarksGravatar Jarred Sumner 5-3/+102
2022-07-04[bench] react hello worldGravatar Jarred Sumner 4-8/+220
2022-07-04Update DockerfileGravatar Jarred Sumner 1-1/+1
2022-07-04[internal] Don't need to run jsc-bindings-headers in CIGravatar Jarred Sumner 2-12/+1
2022-07-04once moreGravatar Jarred Sumner 1-1/+4
2022-07-04[internal] Fix build script on old nodeGravatar Jarred Sumner 1-0/+7
2022-07-04Handle global require("string")Gravatar Jarred Sumner 4-19/+30
2022-07-04Fix case in dynamic require()Gravatar Jarred Sumner 2-5/+24
2022-07-04[internal] Fix duplicate symbol issueGravatar Jarred Sumner 1-3/+0
2022-07-04Fix npm peer dep issueGravatar Jarred Sumner 2-2/+3
2022-07-04[bench] Add a react ssr hello worldGravatar Jarred Sumner 2-0/+37
2022-07-04Update bun.lockbGravatar Jarred Sumner 1-0/+0
2022-07-04Update README.mdGravatar Jarred Sumner 1-15/+6
2022-07-04[resolver] Add a test for self-referencing package.json exportsGravatar Jarred Sumner 1-0/+44
2022-07-04Bump docker build of webkitGravatar Jarred Sumner 1-1/+1
2022-07-04[itnernal] Cleanup some of the streams codeGravatar Jarred Sumner 7-792/+846
2022-07-04[internal] Add a note explaining what to do if this failsGravatar Jarred Sumner 1-0/+4
2022-07-04[jsc] Handle promise ownership (might revert this)Gravatar Jarred Sumner 1-3/+8
2022-07-04[jsc] Run JSC's deferredWorkTimer sometimesGravatar Jarred Sumner 1-1/+1
2022-07-04[jsc] Attempt to make detecting ArrayBuffer/Uint8Array fasterGravatar Jarred Sumner 1-13/+128
2022-07-04[server] Clean up some of the logic for freeing ReadableStreamGravatar Jarred Sumner 1-3/+30
2022-07-04Update __global.zigGravatar Jarred Sumner 1-4/+4
2022-07-04[jsc] Make JSC own the memory for source code stringsGravatar Jarred Sumner 2-19/+40