-
Notifications
You must be signed in to change notification settings - Fork 2
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
Raul Andrade
committed
Mar 1, 2022
1 parent
e6a0831
commit 2be6b59
Showing
11 changed files
with
135 additions
and
32 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
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,32 @@ | ||
import { render, screen } from '@testing-library/react' | ||
import { Header } from './header' | ||
|
||
describe('<Header />', () => { | ||
it('should be render a Header component', () => { | ||
render(<Header />) | ||
|
||
expect( | ||
screen.getByRole('heading', { | ||
name: /randomfy/i | ||
}) | ||
).toBeInTheDocument() | ||
|
||
expect( | ||
screen.getByRole('link', { | ||
name: /home/i | ||
}) | ||
).toBeInTheDocument() | ||
|
||
expect( | ||
screen.getByRole('link', { | ||
name: /about/i | ||
}) | ||
).toBeInTheDocument() | ||
|
||
expect( | ||
screen.getByRole('link', { | ||
name: /log out/i | ||
}) | ||
).toBeInTheDocument() | ||
}) | ||
}) |
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,22 @@ | ||
import Link from 'next/link' | ||
import { Title } from 'components' | ||
|
||
export const Header = () => { | ||
return ( | ||
<div className="mt-8 p-4 flex justify-between items-center sm:flex-row flex-col"> | ||
<Title>Randomfy</Title> | ||
|
||
<header className="flex flex-col"> | ||
<nav className="text-2xl font-thin dark:text-gray-300 text-gray-700 leading-10 tracking-wide"> | ||
<Link href="/">Home</Link> | ||
</nav> | ||
<nav className="text-2xl font-thin dark:text-gray-300 text-gray-700 leading-10 tracking-wide"> | ||
<Link href="/about">About</Link> | ||
</nav> | ||
<nav className="text-2xl font-thin dark:text-gray-300 text-gray-700 leading-10 tracking-wide"> | ||
<Link href="/logout">Log out</Link> | ||
</nav> | ||
</header> | ||
</div> | ||
) | ||
} |
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 @@ | ||
export { Header } from './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
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
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,72 @@ | ||
import { Content, Header, PrimaryText, SubTitle } from 'components' | ||
|
||
const About = () => { | ||
return ( | ||
<Content> | ||
<Header /> | ||
<div className="p-4 mt-8 mb-0 mx-auto sm:w-4/5 w-full"> | ||
<SubTitle>About</SubTitle> | ||
<div className="mt-8"> | ||
<PrimaryText> | ||
Randomfy takes your most listened to Spotify artists and select one | ||
of them for you can know new artists based in this artist selected. | ||
If you liked that artist, you can give a like. After that, you can | ||
make a playlist with the artists liked and share with your friends. | ||
Also you can create a picture with this artists. | ||
</PrimaryText> | ||
<div className="mt-6"> | ||
<PrimaryText> | ||
Disclaimer: Randomfy is not affiliated with Spotify. The site is | ||
built on Nextjs, React and the Spotify API. | ||
</PrimaryText> | ||
</div> | ||
<div className="mt-6"> | ||
<PrimaryText> | ||
Why are you reading this? You must be bored. Go listen to new | ||
artists. | ||
</PrimaryText> | ||
</div> | ||
</div> | ||
|
||
<div className="mt-12"> | ||
<SubTitle>Developer</SubTitle> | ||
<div className="mt-6"> | ||
<PrimaryText>Raul Andrade</PrimaryText> | ||
</div> | ||
</div> | ||
|
||
<div className="mt-12 pb-12"> | ||
<SubTitle>Follow me on</SubTitle> | ||
<div className="mt-2 flex flex-col"> | ||
<a | ||
className="text-2xl font-thin dark:text-gray-300 text-gray-700 leading-10 tracking-wide" | ||
href="https://github.com/andraderaul" | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
Github | ||
</a> | ||
<a | ||
className="text-2xl font-thin dark:text-gray-300 text-gray-700 leading-10 tracking-wide" | ||
href="https://www.linkedin.com/in/andraderaul/" | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
</a> | ||
<a | ||
className="text-2xl font-thin dark:text-gray-300 text-gray-700 leading-10 tracking-wide" | ||
href="https://twitter.com/theandraderaul" | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</Content> | ||
) | ||
} | ||
|
||
export default About |
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
2be6b59
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: