Commit 8ff9db81 authored by Sander Arntzen's avatar Sander Arntzen
Browse files

Endret på port og path

parent 734ba2d8
export const PORT = 8080;
export const PORT = 8081;
export const environment = {
serverURL: "mongodb://it2810-36.idi.ntnu.no:27017/?authSource=it2810",
dbString: "mongodb://it2810-36.idi.ntnu.no:27017/?authSource=it2810"
......
......@@ -2,7 +2,7 @@
"name": "frontend",
"version": "0.1.0",
"private": true,
"homepage": "http://spiller.ingen.rolle.com/movieapp",
"homepage": "http://spiller.ingen.rolle.com/movieappv4",
"dependencies": {
"@apollo/client": "^3.4.16",
"@emotion/react": "^11.5.0",
......
......@@ -15,10 +15,10 @@ import {ApolloClient, ApolloProvider, from, HttpLink, InMemoryCache} from '@apol
//A way to build GraphQL endpoint to server
const link = from([
// Denne koden peker til server på den virtuelle maskinen
//new HttpLink({uri: "http://it2810-36.idi.ntnu.no:8080/graphql"})
//new HttpLink({uri: "http://it2810-36.idi.ntnu.no:8081/graphql"})
// Denne koden peker mot server lokalt på maskinen
new HttpLink({uri: "http://localhost:8080/graphql"})
new HttpLink({uri: "http://localhost:8081/graphql"})
])
......@@ -40,8 +40,8 @@ function App() {
<Header></Header>
<div className="container">
<Switch>
<Route path="/movieapp/" exact component={Home}/>
<Route path="/movieapp/movie/:imdbID" component={MovieDetail}/>
<Route path="/movieappv4/" exact component={Home}/>
<Route path="/movieappv4/movie/:imdbID" component={MovieDetail}/>
</Switch>
</div>
<Footer/>
......
......@@ -11,7 +11,7 @@ exports[`App component renders page correctly like snapshot 1`] = `
data-testid="header"
>
<a
href="/movieapp/"
href="/movieappv4/"
>
<div
class="logo"
......
......@@ -41,12 +41,12 @@ const Header = () => {
const history = useHistory();
const searchbarFocused = useCallback(() => {
window.location.pathname!=='/movieapp/'&&history.push('/movieapp/')
window.location.pathname!=='/movieappv4/'&&history.push('/movieappv4/')
}, [history]);
return (
<div data-testid="header" className="header">
<Link to="/movieapp/">
<Link to="/movieappv4/">
<div className="logo">Movie App</div>
</Link>
<OutlinedInput
......
......@@ -8,8 +8,8 @@ const MovieCard = (dataProps: DBMovie) => {
const history = useHistory();
const [imgSrc, setImgSrc] = useState<string | undefined>(dataProps.posterurl)
return (
<div className="card-item" tabIndex={10} onKeyPress={()=>history.push(`/movieapp/movie/${dataProps.id}`)}>
<Link to={`/movieapp/movie/${dataProps.id}`}>
<div className="card-item" tabIndex={10} onKeyPress={()=>history.push(`/movieappv4/movie/${dataProps.id}`)}>
<Link to={`/movieappv4/movie/${dataProps.id}`}>
<div className="card-innter">
<div className="card-top">
<img src={imgSrc ? imgSrc : poster} onError={() => setImgSrc(poster)} alt={`Filmplakat av ${dataProps.title}. Illustrasjon.`}/>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment