-
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.
Merge pull request #1 from Franppires/debug
test image
- Loading branch information
Showing
13 changed files
with
116 additions
and
61 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,36 @@ | ||
'use client' | ||
import { useEffect, useState } from 'react'; | ||
import { Root } from '@/interface/interfaceNews'; // Certifique-se de que o caminho para a interface está correto | ||
|
||
export default function NewsApi() { | ||
// const apiKey = process.env.REACT_APP_NEWS_API_KEY; | ||
const [dataNews, setDataNews] = useState<Root | null>(null); | ||
|
||
useEffect(() => { | ||
async function fetchData() { | ||
try { | ||
const responseNews = await fetch( | ||
`https://newsapi.org/v2/top-headlines?sources=google-news-br&apiKey=8c18442db94a48f5a1149d114f75ddef` | ||
); | ||
|
||
|
||
console.log('1',responseNews) | ||
if (!responseNews.ok) { | ||
throw new Error('Erro ao buscar notícias'); | ||
} | ||
|
||
console.log('2',responseNews) | ||
|
||
const data: Root = await responseNews.json(); | ||
console.log('2',responseNews) | ||
setDataNews(data); | ||
} catch (error) { | ||
console.error('Erro ao buscar notícias:', error); | ||
setDataNews(null); | ||
} | ||
} | ||
fetchData(); | ||
}, []); | ||
|
||
return dataNews; | ||
} |
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,9 @@ | ||
export default function Contato() { | ||
return ( | ||
<div className='flex items-center justify-between bg-black-800 w-5/6 mx-auto'> | ||
Contato | ||
</div> | ||
<> | ||
<div className='flex items-center justify-center bg-red-800 h-12 p-8'> | ||
<h1 className="text-2xl font-bold uppercase">Contato</h1> | ||
</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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
export default function Edicoes() { | ||
return ( | ||
<div className='flex items-center justify-between bg-black-800 w-5/6 mx-auto'> | ||
Edições | ||
</div> | ||
<> | ||
<div className='flex items-center justify-center bg-red-800 h-12 p-8'> | ||
<h1 className="text-2xl font-bold uppercase">Edições</h1> | ||
</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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
export default function Automobilismo() { | ||
return ( | ||
<div className='flex items-center justify-between bg-black-800 w-5/6 mx-auto'> | ||
Automobilismo | ||
</div> | ||
<> | ||
<div className='flex items-center justify-center bg-red-800 h-12 p-8'> | ||
<h1 className="text-2xl font-bold uppercase">Automobilismo</h1> | ||
</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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
export default function Brasil() { | ||
return ( | ||
<div className='flex items-center justify-between bg-black-800 w-5/6 mx-auto'> | ||
Brasil | ||
</div> | ||
<> | ||
<div className='flex items-center justify-center bg-red-800 h-12 p-8'> | ||
<h1 className="text-2xl font-bold uppercase">Brasil</h1> | ||
</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
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,9 @@ | ||
export default function Esportes() { | ||
return ( | ||
<div className='flex items-center justify-between bg-black-800 w-5/6 mx-auto'> | ||
Esportes | ||
</div> | ||
<> | ||
<div className='flex items-center justify-center bg-red-800 h-12 p-8'> | ||
<h1 className="text-2xl font-bold uppercase">Esportes</h1> | ||
</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
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,5 +1,9 @@ | ||
export default function Midiakit() { | ||
return ( | ||
<div className='flex items-center justify-between bg-black-800 w-5/6 mx-auto'>Mídiakit</div> | ||
<> | ||
<div className='flex items-center justify-center bg-red-800 h-12 p-8'> | ||
<h1 className="text-2xl font-bold uppercase">Midiakit</h1> | ||
</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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
export default function Multmidia() { | ||
return ( | ||
<div className='flex items-center justify-between bg-black-800 w-5/6 mx-auto'> | ||
Multmídia | ||
</div> | ||
<> | ||
<div className='flex items-center justify-center bg-red-800 h-12 p-8'> | ||
<h1 className="text-2xl font-bold uppercase">Multmidia</h1> | ||
</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
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,9 @@ | ||
export default function Servicos() { | ||
return ( | ||
<div className='flex items-center justify-between bg-black-800 w-5/6 mx-auto'> | ||
Serviços | ||
</div> | ||
<> | ||
<div className='flex items-center justify-center bg-red-800 h-12 p-8'> | ||
<h1 className="text-2xl font-bold uppercase">Servicos</h1> | ||
</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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
export default function Video() { | ||
return ( | ||
<div className='flex items-center justify-between bg-black-800 w-5/6 mx-auto'> | ||
Video | ||
</div> | ||
<> | ||
<div className='flex items-center justify-center bg-red-800 h-12 p-8'> | ||
<h1 className="text-2xl font-bold uppercase">Vídeos</h1> | ||
</div> | ||
</> | ||
); | ||
} |
027feed
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:
newsportal – ./
newsportal-self.vercel.app
newsportal-franppires.vercel.app
newsportal-git-main-franppires.vercel.app