Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created basic news reel without stylizing #11

Merged
merged 3 commits into from
Nov 13, 2023
Merged

Created basic news reel without stylizing #11

merged 3 commits into from
Nov 13, 2023

Conversation

frammiie
Copy link
Contributor

No description provided.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put this file in the same directory as the news component (e.g. @/components/news/data.ts instead.)

@@ -15,14 +16,16 @@ export default function News(props: HTMLProps<HTMLDivElement>) {
useEffect(() => {
const interval = setInterval(() => {
setIndexNews(indexNews => indexNews + 1)
}, 10000);
}, 30000);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use a constant for this to prevent "magic numbers" (e.g. NEWS_INTERVAL_MS or the like.)

@frammiie
Copy link
Contributor Author

As for the rest, when you fix the formatting issues this LGTM.

@frammiie frammiie merged commit 8ab1de0 into main Nov 13, 2023
4 checks passed
@frammiie frammiie deleted the news_reel branch November 13, 2023 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants