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 { Inventory } from "../features/inventory/Inventory.js"; | |
import { CurrencyFilter } from "../features/currencyFilter/CurrencyFilter.js"; | |
// Import the Cart component here. | |
import { Cart } from "../features/cart/Cart.js"; | |
import { SearchTerm } from "../features/searchTerm/SearchTerm.js"; | |
// Render the Cart component below <Inventory /> | |
export const App = (props) => { |
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 } from 'react'; | |
import { useSelector, useDispatch } from 'react-redux'; | |
import { addRecipe } from '../favoriteRecipes/favoriteRecipesSlice.js'; | |
import { loadData, selectFilteredAllRecipes } from './allRecipesSlice.js'; | |
import FavoriteButton from "../../components/FavoriteButton"; | |
import Recipe from "../../components/Recipe"; | |
const favoriteIconURL = 'https://static-assets.codecademy.com/Courses/Learn-Redux/Recipes-App/icons/favorite.svg'; |
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 "./App.css"; | |
import React from "react"; | |
import { Score } from "./features/score/Score.js"; | |
import { Board } from "./features/board/Board.js"; | |
import { useDispatch } from "react-redux"; | |
import { setBoard, resetCards } from "./features/board/boardSlice.js"; | |
const App = () => { | |
const dispatch = useDispatch(); | |
const startGameHandler = () => { |
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 url('https://fonts.googleapis.com/css2?family=Oxygen:wght@400;700&display=swap'); | |
html, | |
body { | |
margin: 0; | |
font-family: 'Oxygen', sans-serif; | |
} | |
main { | |
display: flex; |
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
const express = require('express'); | |
const app = express(); | |
// Use static server to serve the Express Yourself Website | |
app.use(express.static('public')); | |
const { getElementById, getIndexById, updateElement, | |
seedElements, createElement } = require('./utils'); | |
const PORT = process.env.PORT || 4001; |
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
const express = require("express"); | |
const { | |
getElementById, | |
getIndexById, | |
updateElement, | |
seedElements, | |
createElement, | |
} = require("./utils"); | |
const animalsRouter = express.Router(); |
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
const express = require('express'); | |
const app = express(); | |
const morgan = require('morgan'); | |
const bodyParser = require('body-parser'); | |
app.use(express.static('public')); | |
const PORT = process.env.PORT || 4001; | |
const cards = [ |
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
<h1>Random String Generator</h1> | |
<div class="container"> | |
<div class="random-string"> | |
<label for="rnd">Random string: </label> | |
<textarea id="rnd" type="textarea"> </textarea> | |
<button onclick="generateRandomString()">Generate</button> | |
</div> | |
</div> | |
<div class="container"> | |
<div class="settings"> |
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 packages | |
const express = require("express"); | |
const app = express(); | |
const session = require("express-session"); | |
const passport = require("passport"); | |
const morgan = require("morgan"); | |
// App config | |
app.set("trust proxy", 1); | |
const PORT = process.env.PORT || 4001; |
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
const express = require('express'); | |
const path = require('path'); | |
const OAuth2Server = require('oauth2-server'); | |
const app = express(); | |
app.use(express.json()); | |
app.use(express.urlencoded({extended: true})); |
OlderNewer