score:0
i came up with something like this, but i am not sure if it is correct.
moviedescription.js
const seriesdescription = {
mindhunterdescription:
'the series tells about the work of fbi special agents holden ford and bill tench, who in 1977 cooperate to develop methods of prosecuting serial killers and to analyze the causes of their crimes.” - netflix "mindhunter" is a story inspired by real events about the beginnings of using psychoanalysis and a psychological approach in solving criminal cases. to this end, the fbi launches a special project in which serial killers are interrogated while serving their crimes. through a series of research, interviews, talks and psychological sessions, they try to get to their motives, learn about the patterns of the murderers\' minds, in order to be able to easily capture those who are still at large.',
sherlockdescription:
"in a new version of sir arthur conan doyle's crime stories, the famous eccentric detective tracks down criminals operating in modern london.” - netflix. sherlock holmes lives in 21st century london, a city filled with mystery, crime and deceit. the back streets are alive with robbers, blackmailers, smugglers and serial killers. when the police are desperate they call upon mr sherlock holmes and his unconventional methods of deduction to shed light on the matter. holmes is assisted by his flatmate and friend, dr john watson, who has returned from military service in afghanistan with the royal army medical corps.",
breakingbaddescription:
"walter white (bryan cranston) is a high school chemistry teacher. he is married to skyler (anna gunn) and teenage son walter junior (rj mitte). the day after his fiftieth birthday, he learns that he suffers from terminal lung cancer. knowing that he will die within a few years, he decides to secure his family's financial future at all costs. together with his former student jesse pinkman (aaron paul), he starts producing the purest methamphetamine in the area. after a while, walt's product becomes the most coveted drug in the city. this gets the attention of the dea anti-drug agency, where walt's brother-in-law, hank (dean norris), works. walter begins to change from a typical domestic into a dangerous dealer operating under the pseudonym heisenberg.",
};
export default seriesdescription;
text.js
import react from 'react';
import './text.css';
import seriesdescription from 'data/seriesdescription';
import { uselocation } from 'react-router-dom';
const text = () => {
const location = uselocation();
let description;
if (location.pathname == '/mindhunter') {
description = seriesdescription.mindhunterdescription;
} else if (location.pathname == '/sherlock') {
description = seriesdescription.sherlockdescription;
} else if (location.pathname == '/breakingbad') {
description = seriesdescription.breakingbaddescription;
}
return (
<div classname="container_text">
<h1>overview</h1>
<div>
<span>{description}</span>
<span></span>
</div>
</div>
);
};
export default text;
however, i am wondering if i should make it as an array of object, but then i don't know how to upload it to the text.js file
another moviedescription.js
const seriesdescription = [
{
mindhunterdescription:
'the series tells about the work of fbi special agents holden ford and bill tench, who in 1977 cooperate to develop methods of prosecuting serial killers and to analyze the causes of their crimes.” - netflix "mindhunter" is a story inspired by real events about the beginnings of using psychoanalysis and a psychological approach in solving criminal cases. to this end, the fbi launches a special project in which serial killers are interrogated while serving their crimes. through a series of research, interviews, talks and psychological sessions, they try to get to their motives, learn about the patterns of the murderers\' minds, in order to be able to easily capture those who are still at large.'
},
{
sherlockdescription:
"in a new version of sir arthur conan doyle's crime stories, the famous eccentric detective tracks down criminals operating in modern london.” - netflix. sherlock holmes lives in 21st century london, a city filled with mystery, crime and deceit. the back streets are alive with robbers, blackmailers, smugglers and serial killers. when the police are desperate they call upon mr sherlock holmes and his unconventional methods of deduction to shed light on the matter. holmes is assisted by his flatmate and friend, dr john watson, who has returned from military service in afghanistan with the royal army medical corps."
},
{
breakingbaddescription:
"walter white (bryan cranston) is a high school chemistry teacher. he is married to skyler (anna gunn) and teenage son walter junior (rj mitte). the day after his fiftieth birthday, he learns that he suffers from terminal lung cancer. knowing that he will die within a few years, he decides to secure his family's financial future at all costs. together with his former student jesse pinkman (aaron paul), he starts producing the purest methamphetamine in the area. after a while, walt's product becomes the most coveted drug in the city. this gets the attention of the dea anti-drug agency, where walt's brother-in-law, hank (dean norris), works. walter begins to change from a typical domestic into a dangerous dealer operating under the pseudonym heisenberg."
}
];
export default seriesdescription;
Source: stackoverflow.com
Related Query
- Changing text due to URL and css text setting
- Test setting text value with React and Enzyme
- Setting text color, outline, and padding on Material-ui Autocomplete component
- Import and read the contents of a CSS file as text (React/webpack)
- React Router V4: How to render a modal in the same screen changing only the url and then with that url, be able to rebuild the whole screen
- Reactjs - modifying State and changing URL onChange
- React router 4 `Link` component only changing the url and not updating the route
- Loading Sass and injecting CSS text into a parent document from a React app
- MaterialUI: Why does setting background color on Select component hides the InputLabel text and how could I avoid it happening?
- How to individually change text color and font weight in the same div element using Tailwind CSS and React
- How to create a css vertical line with circles and text on side in reactjs?
- React : i have following code, i am using setInterval to change text value time to time ,when i switch pages and come back text is changing reallyfast
- Animated bar / text with Tailwind CSS and react
- Problem with use of map function in react for setting text and color of buttons
- CSS not changing text colour or size when targeting className in react
- Checking login status and changing navbar text based on it (React.js)
- Setting URL Parameters with React, React Router, and Firebase (useParams or useRouteMatch)?
- Debouncing and Setting text data not happening at the same time
- Extracting image data url after text manipulation on canvas, and show result in Material-UI's CardMedia
- Aligning checkboxes with description text in HTML and CSS
- Changing url based on id and getting values from local storage. ReactJS
- react css style syntax - set value of css prop with variables and text in one line
- How to color text such that in black background it should be white, and in white bg text color should be black in css
- React component not re-rendering and showing CSS change upon value changing
- React fetch changing request url and breaking request / never reaching server
- I am changing React Classes to React Hooks and getting error on setting state on onChange() function
- A component is changing an uncontrolled input of type text to be controlled error in ReactJS
- How to include bootstrap css and js in reactjs app?
- SyntaxError with Jest and React and importing CSS files
- How to define css variables in style attribute in React and typescript
More Query from same tag
- how to pass array values to Formik select
- React Material <Select> with regular HTML <input> or <select>
- generic event handler to set the state of any form field
- Changing image via passing img src through state not working
- splicing an array from objects resets the whole object
- React testing with Jest and Enzyme (in Symfony) got "Syntax Error: Unexpected token import"
- How can I access a specefic array.map item after render?
- How to work from query selector to useRef in React?
- How to re-render react component when a property changes
- Get value from object based on string concatenation
- Using ReactJS Fullpage how to use onclick of image to go to section
- react-select package not working in build
- add object to initial state in reducer
- Custom hook when taking data in next render lost data
- How to set the error in the array react-final-form
- Unable to access nested object from JSON data
- Edit React state with Hooks
- React JS Context API returning undefined values
- How to add a dropdown menu to my React app?
- How can I pass an argument to onCancel from {...bind} using useLongPress.js in React?
- Material-UI component in React Router Link triggering the link
- "npm run build" = "react-scripts: Permission denied"
- How to delay the redirect of a React Router Link component for 1 second?
- react js handling file upload
- How can I push more products into my Cart in react?
- testing-library react: test changes that is triggered(useEffect) by context functions and variables
- jq: 1 compile error jq: error: schedule/0 is not defined at <top-level>, line 1: .Christchurch.bus-schedule.from["Weekday"] |= . + ["1646"]
- Why does the react-sortable-hoc basic example fail to compile with typescript?
- Using useState-hook to alter styled-components from within
- Exporting Context not working with contextType