diff --git a/code/package-lock.json b/code/package-lock.json index e34d9bb1c..3a317936e 100644 --- a/code/package-lock.json +++ b/code/package-lock.json @@ -9,7 +9,6 @@ "version": "1.0.0", "dependencies": { "@babel/eslint-parser": "^7.18.9", - "babel-eslint": "^10.1.0", "eslint": "^8.21.0", "eslint-config-airbnb": "^19.0.4", "eslint-plugin-import": "^2.26.0", @@ -4637,34 +4636,6 @@ "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==" }, - "node_modules/babel-eslint": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", - "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", - "deprecated": "babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.", - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - }, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "eslint": ">= 4.12.1" - } - }, - "node_modules/babel-eslint/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "engines": { - "node": ">=4" - } - }, "node_modules/babel-jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", @@ -20687,26 +20658,6 @@ "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==" }, - "babel-eslint": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", - "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==" - } - } - }, "babel-jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", diff --git a/code/public/hero.jpg b/code/public/hero.jpg new file mode 100644 index 000000000..60c72936f Binary files /dev/null and b/code/public/hero.jpg differ diff --git a/code/public/hero.webp b/code/public/hero.webp new file mode 100644 index 000000000..06e40e756 Binary files /dev/null and b/code/public/hero.webp differ diff --git a/code/public/index.html b/code/public/index.html index e6730aa66..c12fec3f9 100644 --- a/code/public/index.html +++ b/code/public/index.html @@ -1,9 +1,15 @@ - + + + + - Technigo React App + Survey :D @@ -30,5 +36,4 @@ To create a production bundle, use `npm run build` or `yarn build`. --> - diff --git a/code/src/App.js b/code/src/App.js index f2007d229..4899aef13 100644 --- a/code/src/App.js +++ b/code/src/App.js @@ -1,9 +1,12 @@ import React from 'react'; +import { Survey } from './components/Survey'; export const App = () => { return ( -
- Find me in src/app.js! +
+
+ +
); } diff --git a/code/src/components/Result.js b/code/src/components/Result.js new file mode 100644 index 000000000..eea2818b3 --- /dev/null +++ b/code/src/components/Result.js @@ -0,0 +1,77 @@ +import React from 'react'; +import { Song } from './Song' + +export const Result = (props) => { + let longName = false; + let badSchool = false; + let thinPasta = false; + let song = ''; + let text = ''; + let embedurl = ''; + + if (props.answerOne.length > 4) { longName = true; } + + if (props.answerTwo === 'bad' || props.answerTeo === 'really bad') { badSchool = true; } + + if (props.answerThree === 'plain spaghetti') { thinPasta = true; } + + if (longName && badSchool && thinPasta) { + song = 'American Football - Never Meant'; + text = "you're the true original midwest emo tune. pure longing and regret in 04:28. as they say, 'everyone's a gangster until that second guitar part comes in'. listen and you'll know."; + embedurl = 'https://open.spotify.com/embed/track/6kZqCqD1r08sJAQ1TjuEpM?utm_source=generator' + } + + if (longName && badSchool && !thinPasta) { + song = "Sleep in. - I Do Know And I'm Not Sorry"; + text = "you have attitude, and a riff which makes you want to dramatically throw a plate on the ground. you walk with your back straight. people shouldn't mess with you."; + embedurl = 'https://open.spotify.com/embed/track/4J1Ie6FTecIid0yPEHNGST?utm_source=generator' + } + + if (longName && !badSchool && thinPasta) { + song = 'Modern Baseball - Your Graduation'; + text = "uou're all about high school and unrequited love. you know what? it's their loss. you also have a really good guitar solo."; + embedurl = 'https://open.spotify.com/embed/track/7kVoPBSlGghzLoQjODkxGD?utm_source=generator' + } + + if (longName && !badSchool && !thinPasta) { + song = "Hot Mulligan - How Do You Know It's Not Armadillo Shells?"; + text = "you're what happens when a guitar meets a drum machine and synth. you're both electronic and acoustic. you're the duality of man. and the final product really comes together well."; + embedurl = 'https://open.spotify.com/embed/track/2oEInOIbcj4f9pFpxsS1Td?utm_source=generator' + } + + if (!longName && badSchool && thinPasta) { + song = 'Turnover - I Would Hate You If I Could'; + text = "you're melancholy, and somewhat sultry. but above all, you're really melodic. listening to you sing about old loves feels like walking on velvet in an empty room." + embedurl = 'https://open.spotify.com/embed/track/5g1zOEyrfjMxorKlvCE3AN?utm_source=generator' + } + + if (!longName && badSchool && !thinPasta) { + song = 'The Appleseed Cast - Marigold & Patchwork'; + text = "you're old school. no nonsense. just straight up harsh heartache, wishing to go back in time. but you have to face the fact: it's not 1998 anymore. but there is still beauty in the present."; + embedurl = 'https://open.spotify.com/embed/track/2MPndJjBcn555aZQyuvt3S?utm_source=generator' + } + + if (!longName && !badSchool && !thinPasta) { + song = 'Foxing - The Medic'; + text = "you don't feel like the others. you want more of life. you want to be loved, you want to be intoxicated. but be careful. don't go chasing something that would ultimately kill you."; + embedurl = 'https://open.spotify.com/embed/track/5KzuAU7zxcP0bq0CPdRRyr?utm_source=generator' + } + + if (!longName && !badSchool && thinPasta) { + song = 'Tiny Moving Parts - Medicine'; + text = "you're intricate and modern. something tells me you are always wishing you were somewhere else than where you are, with someone else than the one you are with. but isn't there also beauty in the known?" + embedurl = 'https://open.spotify.com/embed/track/0uqTwEKTbkuhrn8yGSO6b5?utm_source=generator' + } + + return ( +
+

your results:

+

your name is {props.answerOne}, your high school experience was {props.answerTwo}, + and you prefer {props.answerThree} in your pasta dish... +

+
+ +
+
+ ) +} \ No newline at end of file diff --git a/code/src/components/Song.js b/code/src/components/Song.js new file mode 100644 index 000000000..caf23ba34 --- /dev/null +++ b/code/src/components/Song.js @@ -0,0 +1,12 @@ +import React from 'react'; + +export const Song = (props) => { + return ( +
+

you are {props.song}

+

{props.text}

+