Skip to content

Commit 7b88a08

Browse files
committed
[Dashboard] Remove Drawer from Snapshot upload (#5336)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on improving the `SnapshotUpload` component by refactoring its structure, enhancing the CSV upload functionality, and updating the UI to utilize a `Sheet` component instead of a `Drawer`. It also modifies the `CsvDataTable` for better rendering. ### Detailed summary - Replaced `Drawer` with `Sheet` in `SnapshotUpload`. - Added `snapshotIndex`, `index`, and `setOpenSnapshotIndex` props to `SnapshotUpload`. - Updated the `CsvDataTable` rendering logic for better structure. - Enhanced the CSV upload instructions and requirements display. - Modified button styles for consistency and responsiveness. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 5216bef commit 7b88a08

File tree

3 files changed

+226
-242
lines changed

3 files changed

+226
-242
lines changed

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,9 @@ export const ClaimConditionsForm: React.FC<ClaimConditionsFormProps> = ({
510510
<Fragment key={`snapshot_${field.id}_${index}`}>
511511
<SnapshotUpload
512512
dropType={dropType}
513-
isOpen={openSnapshotIndex === index}
514-
onClose={() => setOpenSnapshotIndex(-1)}
513+
snapshotIndex={openSnapshotIndex}
514+
index={index}
515+
setOpenSnapshotIndex={setOpenSnapshotIndex}
515516
value={snapshotValue}
516517
setSnapshot={(snapshot) =>
517518
form.setValue(`phases.${index}.snapshot`, snapshot)

0 commit comments

Comments
 (0)