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

chore: add examples for tablewalker component #332

Merged
merged 3 commits into from
Feb 27, 2024

Conversation

islxyqwe
Copy link
Member

@islxyqwe islxyqwe commented Feb 27, 2024

Add the TableWalker component page and its introduction in readme.md
image

Copy link

vercel bot commented Feb 27, 2024

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

Name Status Preview Comments Updated (UTC)
graphic-walker ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2024 9:31am

Copy link
Contributor

github-actions bot commented Feb 27, 2024

Risk Level 2 - /home/runner/work/graphic-walker/graphic-walker/packages/playground/src/examples/pages/table.stories.tsx

The code seems to be well written and follows the SOLID principles. However, there is a potential risk with the use of an external URL in the useFetch function. If the URL is not available or returns an error, it could break the application. Consider adding error handling for the fetch operation. For example:

const { data, error } = useFetch<IDataSource>('https://...');
if (error) return <div>Error: {error.message}</div>;
if (!data) return <div>Loading...</div>;

This way, the application can handle potential errors gracefully.


Risk Level 2 - /home/runner/work/graphic-walker/graphic-walker/packages/graphic-walker/src/dataSourceProvider/memory.ts

The function createMemoryProvider is using JSON.parse without a try-catch block. This can lead to unhandled exceptions if the input is not valid JSON. Consider adding error handling.

try {
    initData && store.importData(JSON.parse(initData));
} catch (error) {
    console.error('Invalid JSON:', error);
}

Risk Level 2 - /home/runner/work/graphic-walker/graphic-walker/packages/graphic-walker/src/dataSourceProvider/localStorage.ts

The function createLocalStorageProvider is using localStorage to store data. This can be a potential security risk if sensitive data is being stored. Ensure that no sensitive data like passwords or personal user information is being stored in localStorage.


🌐💥🔒


Powered by Code Review GPT

@ObservedObserver ObservedObserver merged commit 682293f into main Feb 27, 2024
6 checks passed
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