Open
Conversation
…dated category.json, and refactored category.tsx and Footer.tsx components" Signed-off-by: Motunrayo Adeneye <67984447+motuncoded@users.noreply.github.com>
This commit introduces the category section of the website and the set up of the aet category page
Signed-off-by: Motunrayo Adeneye <67984447+motuncoded@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Asylcreek
requested changes
Apr 7, 2025
src/app/blog/BlogCard.tsx
Outdated
|
|
||
| const PAGE_SIZE = 6; | ||
| const NEWS_URL = `https://newsapi.org/v2/everything?q=learning&from=2025-03-06&sortBy=publishedAt&pageSize=${PAGE_SIZE}&page=${currentPage}&apiKey=9bb1ce4f63d74db08d7433bd4bfd17a5`; | ||
| const NEXT_PUBLIC_NEWS_API_KEY = process.env.NEXT_PUBLIC_NEWS_API_KEY; |
Collaborator
There was a problem hiding this comment.
This can just be NEWS_API_KEY
src/app/blog/BlogCard.tsx
Outdated
| const [currentPage, setCurrentPage] = useState(1); | ||
| const [totalResults, setTotalResults] = useState(0); | ||
|
|
||
| const PAGE_SIZE = 6; |
Collaborator
There was a problem hiding this comment.
This and line 27 below can be put outside the React function
src/app/lib/supabaseClient.ts
Outdated
|
|
||
| const SUPABASE_URL = "https://uwaealrpqxidfqcdtqac.supabase.co"; | ||
| const SUPABASE_ANON_KEY = | ||
| "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InV3YWVhbHJwcXhpZGZxY2R0cWFjIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDM5NDkwOTgsImV4cCI6MjA1OTUyNTA5OH0.5hV2m3HWEItKISvU2aNUy56ToweNxqsNo9yO0jyoB5g"; |
Collaborator
There was a problem hiding this comment.
You should use an env var for this
Asylcreek
requested changes
Apr 7, 2025
src/app/lib/supabaseClient.ts
Outdated
| "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InV3YWVhbHJwcXhpZGZxY2R0cWFjIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDM5NDkwOTgsImV4cCI6MjA1OTUyNTA5OH0.5hV2m3HWEItKISvU2aNUy56ToweNxqsNo9yO0jyoB5g"; | ||
|
|
||
| const SUPABASE_URL = process.env.NEXT_PUBLIC_SUPABASE_URL!; | ||
| const SUPABASE_ANON_KEY = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!; |
Collaborator
There was a problem hiding this comment.
This looks like it only runs on the server, and as such, you should not save the key with PUBLIC, because PUBLIC is exposed to the frontend
Owner
Author
There was a problem hiding this comment.
I found out that the api is only used in local server and not in production
Collaborator
There was a problem hiding this comment.
Even if. It's a secret, it should not be visible to the public
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This include the setup of the blog section