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 pull request introduces several new UI components and updates to the frontend codebase, focusing on enhancing the user interface and improving the user experience. The most significant changes include adding new dependencies, implementing new components for dialog, calendar, and popover functionalities, and updating the
AdminTable
component to include a form for creating new loans.New Dependencies:
@radix-ui/react-dialog
,@radix-ui/react-popover
,date-fns
, andreact-day-picker
topackage.json
to support new UI components.Component Additions:
calendar.tsx
: Implemented a newCalendar
component usingreact-day-picker
to provide a date selection interface.dialog.tsx
: Added aDialog
component using@radix-ui/react-dialog
for creating modal dialogs.popover.tsx
: Created aPopover
component using@radix-ui/react-popover
for displaying popover content.Component Updates:
Layout.tsx
: Added logout functionality with a button that usesuseAuth
anduseNavigate
hooks fromreact-router-dom
.ProtectedRoute.tsx
: Removed an unnecessary console log statement.Form Integration in AdminTable:
AdminTable.tsx
: Updated to include a form for creating new loans, utilizing the newDialog
,Calendar
, andPopover
components. The form usesreact-hook-form
andzod
for form handling and validation. [1] [2] [3]