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

Implement TrustPositif Checking & Refactor Index #29

Merged
merged 8 commits into from Aug 1, 2022

Conversation

Meta502
Copy link
Contributor

@Meta502 Meta502 commented Jul 30, 2022

Implement TrustPositif checking on client-side to supplement scraped data.

Websites will appear as blocked if it exists in data scraped from indi.wtf or if it exists in the TrustPositif database. Websites blocked on TrustPositif will be given a small "TP" symbol next to them (indicates that it is "officially" blocked).

Optionally you can also forgo scraping indi.wtf since this directly checks all available websites against the official database, but for now i only separated the "blocked" prop into 2 separate boolean values.

Also in the commit is a minor refactor to the index page to make it a bit easier to define new sections, should've put it in a different commit from the TrustPositif but kinda forgot sorry.

Closes #20

@vercel
Copy link

vercel bot commented Jul 30, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
kominfo-d ❌ Failed (Inspect) Sep 1, 2022 at 8:39AM (UTC)

@Meta502 Meta502 changed the title Implement TrustPositif checking Implement TrustPositif Checking & Refactor Index Jul 30, 2022
src/pages/index.tsx Outdated Show resolved Hide resolved
src/pages/index.tsx Outdated Show resolved Hide resolved
Copy link
Owner

@angeloanan angeloanan left a comment

Choose a reason for hiding this comment

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

I really like this change!

Lets address the above comments, then we'll merge this.

@MoonLGH
Copy link

MoonLGH commented Jul 30, 2022

Add some explaination on Modules/ExplanationSection.tsx i guess ?

Copy link

@MoonLGH MoonLGH left a comment

Choose a reason for hiding this comment

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

      <p className='mt-4 max-w-prose'>
        Keterangan, TP(TrustPositif) menandakan bahwa Websitenya sudah {'"'}Resmi di blokir{'"'}
      </p>

on Modules/Explaination

@Meta502
Copy link
Contributor Author

Meta502 commented Jul 30, 2022

Add some explaination on Modules/ExplanationSection.tsx i guess ?

Yep, forgot to change this in my first commit, i'll try to add more explanation later after tidying some things

@Meta502
Copy link
Contributor Author

Meta502 commented Jul 30, 2022

Implemented some of the suggestions given above, let me know what you guys think

Copy link
Owner

@angeloanan angeloanan left a comment

Choose a reason for hiding this comment

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

RSLGTM. Will do a more in-depth code check in a bit. Great work 👍

@angeloanan angeloanan added the enhancement New feature or request label Jul 30, 2022
Copy link

@MoonLGH MoonLGH left a comment

Choose a reason for hiding this comment

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

Yeeaaa, looks good to me
RSLGTM

@angeloanan
Copy link
Owner

image

Looks like the TrustPositif API is also unstable :)

@angeloanan
Copy link
Owner

angeloanan commented Aug 1, 2022

Of course everything is on fire after I took a break. I'm going to try fixing this live in production.

Errors are socket hangups on build. Initial debugging leads to vercel/next.js#39091

@angeloanan angeloanan merged commit c10393f into angeloanan:main Aug 1, 2022
@angeloanan
Copy link
Owner

I've figured out what's wrong with this. As this comment is being posted, kominfo's trustpositif website is timing out constantly.

Kadang capek.

@rorre
Copy link

rorre commented Aug 1, 2022

ini adalah sebuah momen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SUGGESTION] Use Kominfo's TrustPositif API
4 participants