-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8fabdfb
commit b98948d
Showing
17 changed files
with
140 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VITE_API_URL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function Footer() { | ||
return ( | ||
<footer> | ||
footer | ||
</footer> | ||
); | ||
} | ||
|
||
export default Footer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
type Props { | ||
|
||
} | ||
type Props = { | ||
children: JSX.Element | ||
}; | ||
|
||
export type { | ||
Props | ||
} | ||
Props, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function Header() { | ||
return ( | ||
<header> | ||
Ola | ||
</header> | ||
); | ||
} | ||
|
||
export default Header; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function ShowsRow({ shows, title }: { shows: [], title: string }) { | ||
return ( | ||
<h1>ShowsRow</h1> | ||
); | ||
} | ||
|
||
export default ShowsRow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import axios from 'axios'; | ||
|
||
const axiosInstance = axios.create({ | ||
baseURL: 'http://localhost:3000', | ||
baseURL: import.meta.env.VITE_API_URL, | ||
}); | ||
|
||
export default axiosInstance; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
import { ShowCard } from '@components'; | ||
|
||
function Home() { | ||
return ( | ||
<ShowCard /> | ||
<h1>Home</h1> | ||
); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
export { default as Login } from './login/login'; | ||
export { default as Login } from './login/login.page'; | ||
export { default as Home } from './home/home.page'; | ||
export { default as Shows } from './shows/shows.page'; | ||
export { default as Profiles } from './profiles/profiles.page'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function Profiles() { | ||
return ( | ||
<h1>Profiles</h1> | ||
); | ||
} | ||
|
||
export default Profiles; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React, { useEffect } from 'react'; | ||
import { useDispatch, useSelector } from 'react-redux'; | ||
|
||
import { showsActions } from 'store/shows/shows.slice'; | ||
import { Header, Footer, ShowsRow } from '@components'; | ||
import { listSelector, myListSelector } from 'store/shows/shows.selector'; | ||
|
||
function Shows() { | ||
const dispatch = useDispatch(); | ||
const shows = useSelector(listSelector); | ||
const myList = useSelector(myListSelector); | ||
const movies = shows.MOVIE; | ||
const tvShows = shows.TV_SHOWS; | ||
|
||
useEffect(() => { | ||
dispatch(showsActions.getList()); | ||
dispatch(showsActions.getMyList()); | ||
}, []); | ||
|
||
return ( | ||
<> | ||
<Header /> | ||
{ myList && <ShowsRow shows={myList} title="Minha Lista" />} | ||
{ movies && <ShowsRow shows={movies} title="Filmes" />} | ||
{ tvShows && <ShowsRow shows={tvShows} title="Séries" />} | ||
<Footer /> | ||
</> | ||
); | ||
} | ||
|
||
export default Shows; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const HOME_URL = '/'; | ||
const SHOWS_URL = '/shows'; | ||
const LOGIN_URL = '/login'; | ||
const PROFILES_URL = '/profiles'; | ||
const MOVIES_URL = '/movies'; | ||
const TV_SHOWS_URL = '/tv-shows'; | ||
const MY_LIST_URL = '/my-list'; | ||
|
||
export { | ||
HOME_URL, | ||
SHOWS_URL, | ||
LOGIN_URL, | ||
PROFILES_URL, | ||
MOVIES_URL, | ||
TV_SHOWS_URL, | ||
MY_LIST_URL, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters