Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Node.js
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea/
.vscode/
*.suo
*.ntvs*
*.njsproj
*.sln

# MacOS
.DS_Store

# Logs
logs
*.log
logs/*.log

# Vite
dist/
.env.local
.env.*
!.env.example

# Optional, for testing libraries
coverage/
23 changes: 22 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,25 @@ Use the web API (link : https://raw.githubusercontent.com/saaslabsco/frontend-as
## Note

1. Result on platforms like codesandbox, replit are not accepted.
1. Private unaccessible links will lead to rejection.
1. Private unaccessible links will lead to rejection.

## What I Have Implemented

### Table Display:
1. A table displays the data fetched from the API, showing :- Serial Number, Percentage Funded, Amount Pledged.
2. Added responsive design for a better UI experience.

### Pagination:
1. Implemented pagination with a maximum of 5 records per page.
2. Pagination includes dynamic ellipses (...) for better navigation when the page count is high.

### Accessibility:
1. Added proper ARIA attributes for accessibility in the pagination component.
2. Ensured all buttons and table elements are keyboard-navigable.
3. Implemented semantic HTML for better screen reader support.

### Error Handling:
1. Graceful error handling if the API fetch fails, displaying an error message to the user.



38 changes: 38 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'

export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
settings: { react: { version: '18.3' } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]
13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading