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
/* | |
Assume that `colors` in the function below will look something like the following: | |
[ 'Red', 'Yellow', 'White' ]; | |
*/ | |
// Require `addColorToPlant` here. | |
let addColorToPlant=require("./plants.js"); | |
function generateRosesByColor(colors) { | |
let result = []; |
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
/* | |
In the following function, assume plant is an object. | |
*/ | |
function addColorToPlant(plant, color) { | |
plant.color = color; | |
return plant; | |
} | |
// Export `addColorToPlant` here. | |
module.exports = addColorToPlant; |
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
module.exports = { | |
API_ENDPOINT: 'https://localhost:3000/', | |
API_KEY: process.env.REACT_APP_API_KEY, | |
API_DEV_ENDPOINT :'http://localhost:8000/', | |
} |
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, {Component} from 'react'; | |
import {Link } from 'react-router-dom' | |
import ApiContext from '../ApiContext'; | |
import './MyCloset.css' | |
import NewItemButton from '../NewItemButton/NewItemButton'; | |
import {getClosetItems} from '../items-helpers'; | |
import Item from '../Item/Item'; | |
import TokenService from '../services/token-service'; | |
import config from '../config'; |
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
function findMyCampsites (campgrounds, viewToMatch, partySizeToMatch){ | |
let dreamSite =[]; | |
let sorryMessage = "Sorry, no campsites with that view are available to host your party"; | |
for (let i = 0; i< campgrounds.length; i++){ | |
if (campgrounds[i].isReserved === false && | |
campgrounds[i].view === viewToMatch && | |
campgrounds[i].partySize >= partySizeToMatch){ | |
dreamSite.push(campgrounds[i].number); | |
} |
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 Option from "../Option/Option"; | |
import Total from "../Total/Total"; | |
export default function MainSummary(props) { | |
const { USCurrencyFormat } = props; | |
const summary = Object.keys(props.selected).map((feature, idx) => { | |
const featureHash = feature + "-" + idx; | |
const selectedOption = props.selected[feature]; |
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"; | |
export default function Option(props) { | |
const { USCurrencyFormat } = props; | |
return ( | |
<div className="summary__option" key={props.featureHash}> | |
<div className="summary__option__label">{props.feature}</div> | |
<div className="summary__option__value">{props.selectedOption!=null && props.selectedOption.name}</div> | |
<div className="summary__option__cost"> |
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 Option from "../Option/Option"; | |
import Total from "../Total/Total"; | |
export default function MainSummary(props) { | |
const { USCurrencyFormat } = props; | |
const summary = Object.keys(props.selected).map((feature, idx) => { | |
const featureHash = feature + "-" + idx; | |
const selectedOption = props.selected[feature]; |
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
C:\code\thinkful\tc\AJVDV\blogful-api>npm run test | |
> blogful-api@1.0.0 test C:\code\thinkful\tc\AJVDV\blogful-api | |
> mocha --require test/setup.js | |
App | |
::ffff:127.0.0.1 - - [17/Dec/2020:16:36:36 +0000] "GET / HTTP/1.1" 200 13 | |
√ GET / responds with 200 containing "Hello, world!" (53ms) |
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
// 006 | |
CREATE TABLE payment_summaries ( | |
id INTEGER PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, | |
course_id INTEGER REFERENCES bootcamp_courses(id), | |
monthly FLOAT, | |
up_front FLOAT, | |
interest_only_loan TEXT, | |
immediate_repayment_loan TEXT, | |
isa TEXT |
NewerOlder