From 60d6560f16a43dc90e16184e4c01ff164b8719bc Mon Sep 17 00:00:00 2001 From: Kausha3 <133591404+Kausha3@users.noreply.github.com> Date: Mon, 12 Feb 2024 10:18:47 -0500 Subject: [PATCH 1/5] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 891dcb4d..bd6e212a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Personal Information: -Full Name: Enter Your Full Name +Full Name: Kausha Himanshu Trivedi ## Getting Started First, fork this repository and clone it to your local machine. @@ -43,4 +43,4 @@ To learn more about React.js, take a look at the [React Documentation](https://l ## What to Submit? -Submit all changes made to files in `src/pages/qcomps` in Canvas class activity for the day. \ No newline at end of file +Submit all changes made to files in `src/pages/qcomps` in Canvas class activity for the day. From 2bf8e89da44aa5c6cc1e140e18d1f1210a47019d Mon Sep 17 00:00:00 2001 From: Kausha3 Date: Mon, 12 Feb 2024 10:53:32 -0500 Subject: [PATCH 2/5] Lab Activity --- .idea/inspectionProfiles/Project_Default.xml | 6 +++ .idea/learn-react.iml | 9 ++++ .idea/misc.xml | 6 +++ .idea/modules.xml | 8 ++++ .idea/vcs.xml | 6 +++ .idea/workspace.xml | 44 ++++++++++++++++++++ src/pages/index.js | 8 ++++ src/pages/qcomps/bios.js | 2 + src/pages/qcomps/firstcomp.js | 17 +++++++- src/pages/qcomps/profile_mistake.js | 5 ++- src/pages/qcomps/todos.js | 8 +++- 11 files changed, 114 insertions(+), 5 deletions(-) create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/learn-react.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..03d9549e --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/learn-react.iml b/.idea/learn-react.iml new file mode 100644 index 00000000..d6ebd480 --- /dev/null +++ b/.idea/learn-react.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..639900d1 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..084c1429 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 00000000..644064e9 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + 1707751200869 + + + + \ No newline at end of file diff --git a/src/pages/index.js b/src/pages/index.js index 69abbb64..8a963ffb 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -3,11 +3,19 @@ // import { Inter } from 'next/font/google' import styles from '@/styles/Home.module.css' import Profile from './components/profile' +import ProfileMistake from './qcomps/profile_mistake' +import FirstComp from './qcomps/firstcomp'; +import Bio from './qcomps/bios'; +import TodoList from './qcomps/todos'; export default function Home() { return (
+ + + +
) } diff --git a/src/pages/qcomps/bios.js b/src/pages/qcomps/bios.js index cc9350fd..f5a01a6a 100644 --- a/src/pages/qcomps/bios.js +++ b/src/pages/qcomps/bios.js @@ -1,5 +1,6 @@ export default function Bio() { return ( + <>

Welcome to my website!

@@ -8,5 +9,6 @@ export default function Bio() {

And pictures of people!

+ ); } \ No newline at end of file diff --git a/src/pages/qcomps/firstcomp.js b/src/pages/qcomps/firstcomp.js index 9cce715e..ed753dcd 100644 --- a/src/pages/qcomps/firstcomp.js +++ b/src/pages/qcomps/firstcomp.js @@ -1 +1,16 @@ -function MyComp() {} \ No newline at end of file +import React from 'react'; + +const FirstComp = () => { + return ( +
+

My first component

+
    +
  1. Components: UI Building Block
  2. +
  3. Defining a Component
  4. +
  5. Using a component
  6. +
+
+ ); +}; + +export default FirstComp; \ No newline at end of file diff --git a/src/pages/qcomps/profile_mistake.js b/src/pages/qcomps/profile_mistake.js index ac318d70..28ab5211 100644 --- a/src/pages/qcomps/profile_mistake.js +++ b/src/pages/qcomps/profile_mistake.js @@ -1,4 +1,5 @@ export default function profile() { - return - Katsuko Saruhashi; + return ( + Katsuko Saruhashi + ); } diff --git a/src/pages/qcomps/todos.js b/src/pages/qcomps/todos.js index 99713488..15ebad47 100644 --- a/src/pages/qcomps/todos.js +++ b/src/pages/qcomps/todos.js @@ -14,9 +14,13 @@ export default function TodoList() {

Person Name's Todos

Person's Name
); } + + + + From 9ebc0613957c4b907514c4d40a9106aa0b8b3084 Mon Sep 17 00:00:00 2001 From: Kausha3 <133591404+Kausha3@users.noreply.github.com> Date: Tue, 20 Feb 2024 21:18:33 -0500 Subject: [PATCH 3/5] Update props_item.js --- src/pages/qcomps/props_item.js | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/pages/qcomps/props_item.js b/src/pages/qcomps/props_item.js index 79a9e151..d63c426d 100644 --- a/src/pages/qcomps/props_item.js +++ b/src/pages/qcomps/props_item.js @@ -1,8 +1,9 @@ function Item({ name, isPacked }) { - if (isPacked) { - return
  • {name} ✔
  • ; - } - return
  • {name}
  • + return ( +
  • + {isPacked ? {name} ✔ : name} +
  • + ); } export default function PackingList() { @@ -10,18 +11,9 @@ export default function PackingList() {

    My Packing List

    ); From 0e03279155ab1e85e47bca30f869785b21fd67e6 Mon Sep 17 00:00:00 2001 From: Kausha3 <133591404+Kausha3@users.noreply.github.com> Date: Tue, 20 Feb 2024 21:19:52 -0500 Subject: [PATCH 4/5] Update list_keys_id.js --- src/pages/qcomps/list_keys_id.js | 41 +++++++++++++++++++------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/src/pages/qcomps/list_keys_id.js b/src/pages/qcomps/list_keys_id.js index f10c9b88..bd6f95fc 100644 --- a/src/pages/qcomps/list_keys_id.js +++ b/src/pages/qcomps/list_keys_id.js @@ -1,24 +1,33 @@ -export const people = [{ - id: 0, - name: 'Creola Katherine Johnson', - profession: 'mathematician', - accomplishment: 'spaceflight calculations', - imageId: 'szV5sdG' -}, { - id: 1, - name: 'Mario José Molina-Pasquel Henríquez', - profession: 'chemist', - accomplishment: 'discovery of Arctic ozone hole', - imageId: 'YfeOqp2' -}]; +export const people = [ + { + id: 0, + name: 'Creola Katherine Johnson', + profession: 'mathematician', + accomplishment: 'spaceflight calculations', + imageId: 'szV5sdG' + }, + { + id: 1, + name: 'Mario José Molina-Pasquel Henríquez', + profession: 'chemist', + accomplishment: 'discovery of Arctic ozone hole', + imageId: 'YfeOqp2' + } +]; function getImageUrl(imageId) { - return "https://i.imgur.com/" + imageId + "s.jpg" + return "https://i.imgur.com/" + imageId + "s.jpg"; } + export default function List() { const listItems = people.map(person => -
  • +
  • + {person.name} +
    Name: {person.name}
    +
    Profession: {person.profession}
    +
    Accomplishment: {person.accomplishment}
  • ); + return ; -} \ No newline at end of file +} From 92550a739f8f755f200abfb2227c0e012f03c600 Mon Sep 17 00:00:00 2001 From: Kausha3 <133591404+Kausha3@users.noreply.github.com> Date: Tue, 20 Feb 2024 21:20:58 -0500 Subject: [PATCH 5/5] Update recipes.js --- src/pages/qcomps/recipes.js | 43 ++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/src/pages/qcomps/recipes.js b/src/pages/qcomps/recipes.js index 37803925..12ba43dd 100644 --- a/src/pages/qcomps/recipes.js +++ b/src/pages/qcomps/recipes.js @@ -1,22 +1,35 @@ -export const recipes = [{ - id: 'greek-salad', - name: 'Greek Salad', - ingredients: new Set(['tomatoes', 'cucumber', 'onion', 'olives', 'feta']) -}, { - id: 'hawaiian-pizza', - name: 'Hawaiian Pizza', - ingredients: new Set(['pizza crust', 'pizza sauce', 'mozzarella', 'ham', 'pineapple']) -}, { - id: 'hummus', - name: 'Hummus', - ingredients: new Set(['chickpeas', 'olive oil', 'garlic cloves', 'lemon', 'tahini']) -}]; +export const recipes = [ + { + id: 'greek-salad', + name: 'Greek Salad', + ingredients: new Set(['tomatoes', 'cucumber', 'onion', 'olives', 'feta']) + }, + { + id: 'hawaiian-pizza', + name: 'Hawaiian Pizza', + ingredients: new Set(['pizza crust', 'pizza sauce', 'mozzarella', 'ham', 'pineapple']) + }, + { + id: 'hummus', + name: 'Hummus', + ingredients: new Set(['chickpeas', 'olive oil', 'garlic cloves', 'lemon', 'tahini']) + } +]; export default function RecipeList() { return (

    Recipes

    - {} + {recipes.map(recipe => ( +
    +

    {recipe.name}

    +
      + {[...recipe.ingredients].map((ingredient, index) => ( +
    • {ingredient}
    • + ))} +
    +
    + ))}
    ); -} \ No newline at end of file +}