Merge branch 'exercise-solutions'

pull/260/head
Jaspreet 3 years ago
commit 6f21a1607f

@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

@ -0,0 +1,70 @@
# Getting Started with Create React App
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
The page will reload when you make changes.\
You may also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
### Analyzing the Bundle Size
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Making a Progressive Web App
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
### Advanced Configuration
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,38 @@
{
"name": "components-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<title>React App</title>
</head>
<body>
<div id="root"></div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

@ -0,0 +1,36 @@
body{
padding: 0 ;
margin: 0;
font-family:'Courier New', Courier, monospace;
}
.header-wrapper{
background-color: aqua;
padding-left: 40px;
}
.main-wrapper{
padding-left: 40px;
}
.main-wrapper h2 {
padding-left: 100px;
}
footer{
text-align: center;
background-color: aqua;
padding: 5px 0;
}
.imageDiv{
display: flex;
flex-direction: column;
}
img{
border-radius: 50%;
width: 350px;
height: 400px;
margin-top: 30px;
}

@ -0,0 +1,149 @@
// index.js
// Import React, ReactDOM, stylesheet, and image
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import profileImage from './images/profileImage.jpg'
// Get root from HTML file
const root = ReactDOM.createRoot(document.getElementById('root'))
// Component is a small, reusable code
// - can be function or class based components
// - functional are presentational, stateless, dumb
// - class are conatiners, statefull, smart
// Component name must start with uppercase and if two words be camel case
// React Component Syntax
// const jsx = () =>{
// return jsx
//}
// dynamic data
const welcome = 'Welcome to 30 Days Of React';
const title = 'Getting Started React';
const subtitle = 'JavaScript Library';
const author = {
firstName: 'Clark',
lastName: 'Gable'
}
const date = 'Jan 18th, 2023';
// Header component
const Header = () => {
return (
<header>
<div className='header-wrapper'>
<h1>{welcome}</h1>
<h2>{title}</h2>
<h3>{subtitle}</h3>
<p>Instructor: {author.firstName} {author.lastName}</p>
<small>Date: {date}</small>
</div>
</header>
)
}
const numOne = 3
const numTwo = 2
const result = (
<p>
{numOne} + {numTwo} = {numOne + numTwo}
</p>
)
const yearBorn = 1820
const currentYear = 2020
const age = currentYear - yearBorn
const personAge = (
<p>
{' '}
{author.firstName} {author.lastName} is {age} years old
</p>
)
// User card component
const UserCard = () => {
return (
<div className='imageDiv'>
<img src={profileImage} alt='profile' />
<h2>{author.firstName} {author.lastName}</h2>
</div>
)
}
const techs = ['HTML', 'CSS', 'JavaScript'];
const techsFormatted = techs.map((tech) => <li key={tech}>{tech}</li>)
// Main component
const Main = () => {
return (
<main>
<div className='main-wrapper'>
<p>Prerequisite to get started react.js:</p>
<ul>
{techsFormatted}
</ul>
{result}
{personAge}
</div>
<UserCard />
</main>
)
}
const copyRight = '2023'
// footer component
const Footer = () => {
return (
<footer>
<div className='footer-wrapper'>
<p>Copyright &copy;{copyRight}</p>
</div>
</footer>
)
}
const buttonStyles = {
margin: '10px',
padding: '10px 20px',
background: 'rgb(0,255,0)',
border: 'none',
borderRadius: 5,
}
const Button = () => <button style={buttonStyles}>action</button>
// Hexadecimal color generator
const hexaColor = () => {
let str = '0123456789abcdef'
let color = ''
for (let i = 0; i < 6; i++) {
let index = Math.floor(Math.random() * str.length)
color += str[index]
}
return '#' + color
}
const HexaColor = () => <div>Randome hex color: {hexaColor()}</div>
// App parent component
const App = () => {
return (
<div className='app'>
<Header />
<Main />
<Button/>
<HexaColor/>
<Footer />
</div>
)
}
// render root, pass it the parent component
root.render(<App/>)

@ -0,0 +1,45 @@
// What is the difference between a regular function and an arrow function?
// - regular functions can be names, arrow functions cannot be named
// What is a React Component?
// - a component is a small resusable code
// How do you make a React functional component?
// - they are naming is capitalize
// What is the difference between a pure JavaScript function and a functional component?
// - javascript functions do not have html tags, functional components do have html tags
// How small is a React component?
// - can be one line of code
// Can we make a button or input field component?
// - yes
// Make a reusable Button component.
const Button = () => <button>Action</button>;
// Make a reusable InputField component.
const InputField = () => <input type='text' placeholder='Enter name'/>
// Make a reusable alert box component with one div parent element and one p child element of the div(warning alert box, success alert box).
const warning = alert('warning you need to stop');
const success = alert('success')
const AlertBox = () => {
return(
<div>
{warning}
<div>
{success}
</div>
</div>
)
}

@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

@ -0,0 +1,70 @@
# Getting Started with Create React App
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
The page will reload when you make changes.\
You may also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
### Analyzing the Bundle Size
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Making a Progressive Web App
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
### Advanced Configuration
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,38 @@
{
"name": "logo-components",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<title>React App</title>
</head>
<body>
<div id="root"></div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

@ -0,0 +1,101 @@
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
/* change font */
body {
height: 100%;
line-height: 1.5;
font-family: 'Montserrat';
font-weight: 300;
color: black;
}
/* make all images flex items and center them */
.logos {
display: flex;
flex-wrap: wrap;
justify-content: center;
margin: 0 auto;
}
/* change image size */
.logos img {
width: 20%;
}
/* center title */
.title h1 {
text-align: center;
margin-bottom: 25px;
}
/* main wrapper */
.main-wrapper {
background-color: lightblue;
max-width: 80%;
margin: 0 auto;
border-radius: 10px;
margin-top: 40px;
}
/* main h1 tag */
.main-wrapper h1 {
text-align: center;
padding: 30px 0;
text-transform: uppercase;
}
/* main p tag */
.main-wrapper p {
text-align: center;
padding-bottom: 50px;
font-weight: 500;
}
/* main input wrapper */
.dataEntry {
display: flex;
justify-content: center;
}
/* main input tag */
.dataEntry input {
margin: 0 10px;
padding: 10px;
border-radius: 10px;
border: none;
}
/* main button */
button {
margin: 50px 0;
padding: 10px 120px;
text-align: center;
border-radius: 10px;
border: none;
background-color: lightcoral;
color: white;
}
/* on smaller screens change items to make responsive */
@media screen and (max-width: 700px) {
.logos img {
width: 100%;
}
.dataEntry input {
width: 33%;
}
button {
padding: 10px 60px;
}
}

@ -0,0 +1,84 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css'
import HTML from './images/html5-logo.png'
import CSS from './images/css3-logo.png'
import JS from './images/js-logo.png'
import ReactLogo from './images/react-logo.png'
// NEW WAY TO CREATE A ROOT IN VERSION 18
// Create React root for div in HTML
const root = ReactDOM.createRoot(document.getElementById('root'));
// Images component
const Images = () =>{
return(
<div className='logos'>
<img src={HTML} alt='HTML5 Logo'/>
<img src={CSS} alt='CSS3 Logo' className='cssLogo'/>
<img src={JS} alt='JS Logo'/>
<img src={ReactLogo} alt='React Logo'/>
</div>
)
}
// Header component
const Header = () =>{
return(
<header className='title'>
<h1>Front End Technologies</h1>
<Images/>
</header>
)
}
const SignUpInfo = () => {
return (
<section>
<h1>Subscribe</h1>
<p>Sign up with your email address to receive news and updates.</p>
</section>
)
}
const Inputs = () =>{
return (
<section>
<input placeholder='First name' type='text'/>
<input placeholder='Last name' type='text'/>
<input placeholder='Email' type='text'/>
</section>
)
}
const SubmitButton = () => <center><button type='submit'>Subscribe</button></center>
// Main component
const Main = () => {
return (
<main>
<div className='main-wrapper'>
<SignUpInfo/>
<div className='dataEntry'>
<Inputs/>
</div>
<SubmitButton/>
</div>
</main>
)
}
// create App component, parent
const App = () => {
return(
<div>
<Header/>
<Main/>
</div>
)
}
// Render Parent Component to DOM
root.render(<App/>);

@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

@ -0,0 +1,70 @@
# Getting Started with Create React App
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
The page will reload when you make changes.\
You may also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
### Analyzing the Bundle Size
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Making a Progressive Web App
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
### Advanced Configuration
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,38 @@
{
"name": "hexgen-and-profile",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<title>React App</title>
</head>
<body>
<div id="root"></div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

@ -0,0 +1,87 @@
.hex {
text-align: center;
padding: 35px;
font-size: 24px;
color: white;
}
.colorsContainer{
margin-bottom: 40px;
}
/* set border and background color of app */
.appBorder {
border: 10px solid lightgrey;
background-color: lightgrey;
border-radius: 10px;
}
/* set app background white*/
.app {
background-color: white;
border-radius: 10px;
}
.header-wrapper {
display: flex;
flex-direction: column;
}
.header-wrapper img {
border-radius: 50%;
width: 350px;
height: 400px;
margin-top: 30px;
}
/* add left padding to all elements */
.header-wrapper,
.main-wrapper,
.footer-wrapper {
margin-left: 30px;
}
/* change size and color of check mark */
span {
margin-left: 5px;
position: relative;
top: -5px;
background-color: rgb(10, 240, 220);
border-radius: 50%;
font-size: 15px;
padding: 4px 7px;
}
.main-wrapper button {
font-size: 20px;
border: none;
border-radius: 10px;
color: white;
background-color: rgb(10, 240, 220);
padding: 10px 27px;
margin: 5px 5px;
}
.footer-wrapper p {
padding: 20px 0;
margin: 0;
}
/* on smaller screens change items to make responsive */
@media screen and (max-width: 700px) {
.header-wrapper {
margin-left: 18px;
}
.header-wrapper img {
width: 250px;
height: 300px;
}
.main-wrapper {
display: flex;
flex-wrap: wrap;
flex-direction: column;
margin: 0 25px;
}
}

@ -0,0 +1,117 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import profileImage from './images/profileImage.jpg'
const root = ReactDOM.createRoot(document.getElementById('root'));
// Hexadecimal color generator
const hexaColor = () => {
let str = '0123456789abcdef'
let color = ''
for (let i = 0; i < 6; i++) {
let index = Math.floor(Math.random() * str.length)
color += str[index]
}
return '#' + color
}
const HexaColor = () => <div style={{backgroundColor: hexaColor()}} className='hex'>{hexaColor()}</div>
// add HexaColor component to array
const Colors = ()=>{
const arrColors = [];
// Add 5 Hexacolor components to the array
for(let i = 0; i < 5; i++){
arrColors.push(<HexaColor key={i}/>)
}
// return all elements of the array
return (
<div className='colorsContainer'>
{arrColors}
</div>
)
}
//..................................................//
//profile card
const userName = {
firstName: 'Arthur',
lastName: 'Bradshaw'
}
const title = 'Senior Developer';
const location = 'Spain';
// profile header component
const Header = () => {
return(
<header className='header-wrapper'>
<img src={profileImage} alt='User Profile'/>
<h1>{userName.firstName} {userName.lastName}<span>&#10003;</span></h1>
<p>{title}, {location}</p>
</header>
)
}
const skills = [
'HTML' , 'CSS', 'Sass', 'JS', 'React', 'Redux',
'Node', 'MongoDB', 'Python', 'Flask', 'Django',
'NumPy', 'Pandas', 'Data Analysis', 'MYSQL', 'GraphQL',
'D3.js', 'Gatsby', 'Docker', 'Heroku', 'Git'
];
const skillButtons = skills.map(skill=>{return <button type='button' key={skill}>{skill}</button>})
// profile main component
const ProfileMain = () => {
return(
<div className='main-wrapper'>
<h2>Skills</h2>
{skillButtons}
</div>
)
}
const day = new Date().getDate()
const month = new Date().getMonth()
const year = new Date().getFullYear()
const monthArray = [
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'
]
// profile footer component
const Footer = () => {
return (
<div className='footer-wrapper'>
<p>&#128337; Joined on {monthArray[month]} {day}, {year}</p>
</div>
)
}
//Profile card component, parent
const Profile =() =>{
return (
<div className='appBorder'>
<div className='app'>
<Header/>
<ProfileMain/>
<Footer/>
</div>
</div>
)
}
//Main component, parent
const Main = ()=>{
return(
<div>
<Colors/>
<Profile/>
</div>
)
}
root.render(<Main/>);
Loading…
Cancel
Save