From 4951bb8fb511b3e527888161e4f0bcd969f9a96e Mon Sep 17 00:00:00 2001 From: izzydotexe Date: Sun, 7 Jul 2024 20:41:22 -0400 Subject: [PATCH] refac and fix notes scroll --- arc3-dash/src/components/Notes/NotesDisplay.css | 5 +++++ arc3-dash/src/components/Notes/NotesDisplay.jsx | 15 +++++++++++++++ .../Notes/{NoteUserList.css => NotesUserList.css} | 1 + arc3-dash/src/components/Notes/NotesUserList.jsx | 2 +- arc3-dash/src/routes/Notes.css | 5 ----- arc3-dash/src/routes/Notes.jsx | 13 +------------ 6 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 arc3-dash/src/components/Notes/NotesDisplay.css create mode 100644 arc3-dash/src/components/Notes/NotesDisplay.jsx rename arc3-dash/src/components/Notes/{NoteUserList.css => NotesUserList.css} (74%) diff --git a/arc3-dash/src/components/Notes/NotesDisplay.css b/arc3-dash/src/components/Notes/NotesDisplay.css new file mode 100644 index 0000000..ebdc81b --- /dev/null +++ b/arc3-dash/src/components/Notes/NotesDisplay.css @@ -0,0 +1,5 @@ + +.notes-display { + width: 100%; + overflow-x: scroll; +} \ No newline at end of file diff --git a/arc3-dash/src/components/Notes/NotesDisplay.jsx b/arc3-dash/src/components/Notes/NotesDisplay.jsx new file mode 100644 index 0000000..886686f --- /dev/null +++ b/arc3-dash/src/components/Notes/NotesDisplay.jsx @@ -0,0 +1,15 @@ +import {Note} from "./Note"; +import "./NotesDisplay.css" + +export default function NotesDisplay({notes, filter}) { + + return
+ { + notes.sort((a, b) => { + return parseInt(b.date) - parseInt(a.date) + }).map((x, i) => { + return + }) + } +
+} \ No newline at end of file diff --git a/arc3-dash/src/components/Notes/NoteUserList.css b/arc3-dash/src/components/Notes/NotesUserList.css similarity index 74% rename from arc3-dash/src/components/Notes/NoteUserList.css rename to arc3-dash/src/components/Notes/NotesUserList.css index a611b54..ef11818 100644 --- a/arc3-dash/src/components/Notes/NoteUserList.css +++ b/arc3-dash/src/components/Notes/NotesUserList.css @@ -1,4 +1,5 @@ .note-user { display: flex; justify-content: space-between; + overflow-x: scroll; } \ No newline at end of file diff --git a/arc3-dash/src/components/Notes/NotesUserList.jsx b/arc3-dash/src/components/Notes/NotesUserList.jsx index a8fac17..68ebea8 100644 --- a/arc3-dash/src/components/Notes/NotesUserList.jsx +++ b/arc3-dash/src/components/Notes/NotesUserList.jsx @@ -1,5 +1,5 @@ import {NoteUser} from "./NoteUser"; -import './NoteUserList.css' +import './NotesUserList.css' import {useEffect, useState} from "react"; export default function NoteUserList({notesUsers, setNotes, filter}) { diff --git a/arc3-dash/src/routes/Notes.css b/arc3-dash/src/routes/Notes.css index c1dd5f4..ad8d7d4 100644 --- a/arc3-dash/src/routes/Notes.css +++ b/arc3-dash/src/routes/Notes.css @@ -28,11 +28,6 @@ margin: 10px 30px; } -.notes-display { - width: 100%; - overflow-x: scroll; -} - .notes > section > h2 { color: white; font-size: xx-large; diff --git a/arc3-dash/src/routes/Notes.jsx b/arc3-dash/src/routes/Notes.jsx index 91183fa..242cc68 100644 --- a/arc3-dash/src/routes/Notes.jsx +++ b/arc3-dash/src/routes/Notes.jsx @@ -6,6 +6,7 @@ import "./Notes.css" import NoteUserList from "../components/Notes/NotesUserList"; import {Note} from "../components/Notes/Note"; +import NotesDisplay from "../components/Notes/NotesDisplay"; export default function Notes() { @@ -45,15 +46,3 @@ export default function Notes() { } -function NotesDisplay({notes, filter}) { - - return
- { - notes.sort((a, b) => { - return parseInt(b.date) - parseInt(a.date) - }).map((x, i) => { - return - }) - } -
-} \ No newline at end of file