Skip to content

Commit

Permalink
Merge pull request #43 from IzzyDotExe/user-notes
Browse files Browse the repository at this point in the history
refac and fix notes scroll
  • Loading branch information
IzzyDotExe committed Jul 8, 2024
2 parents 7c84ea0 + 4951bb8 commit 992e51c
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 18 deletions.
5 changes: 5 additions & 0 deletions arc3-dash/src/components/Notes/NotesDisplay.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

.notes-display {
width: 100%;
overflow-x: scroll;
}
15 changes: 15 additions & 0 deletions arc3-dash/src/components/Notes/NotesDisplay.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {Note} from "./Note";
import "./NotesDisplay.css"

export default function NotesDisplay({notes, filter}) {

return <section className="notes-display">
{
notes.sort((a, b) => {
return parseInt(b.date) - parseInt(a.date)
}).map((x, i) => {
return <Note note={x} lid={i} key={i}/>
})
}
</section>
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.note-user {
display: flex;
justify-content: space-between;
overflow-x: scroll;
}
2 changes: 1 addition & 1 deletion arc3-dash/src/components/Notes/NotesUserList.jsx
Original file line number Diff line number Diff line change
@@ -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}) {
Expand Down
5 changes: 0 additions & 5 deletions arc3-dash/src/routes/Notes.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
margin: 10px 30px;
}

.notes-display {
width: 100%;
overflow-x: scroll;
}

.notes > section > h2 {
color: white;
font-size: xx-large;
Expand Down
13 changes: 1 addition & 12 deletions arc3-dash/src/routes/Notes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down Expand Up @@ -45,15 +46,3 @@ export default function Notes() {
}


function NotesDisplay({notes, filter}) {

return <section className="notes-display">
{
notes.sort((a, b) => {
return parseInt(b.date) - parseInt(a.date)
}).map((x, i) => {
return <Note note={x} lid={i} key={i}/>
})
}
</section>
}

0 comments on commit 992e51c

Please sign in to comment.