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/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. 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/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 +} 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/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

    ); 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}

    + +
    + ))}
    ); -} \ No newline at end of file +} 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
    ); } + + + +