Open thomasreichmann opened 2 days ago
we'll need to create a table in postgres for this, add a foreign key to the user for each file added to it and then fetch from that in the file list
for reloading the list after uploading we can just invalidate the query like we do for user updating in the settings mutation https://github.com/thomasreichmann/upload-thomasar/blob/180d891f5e33faeb66dce5012eb5ec21b6287e3e/src/app/_components/settings/settingsModal.tsx#L28-L30
after finishing the upload in here: https://github.com/thomasreichmann/upload-thomasar/blob/180d891f5e33faeb66dce5012eb5ec21b6287e3e/src/app/_hooks/useUpload.ts#L83-L93 we need to add a record to postgres for that user to then display that file in the list that currently is just mocked with a few random items https://github.com/thomasreichmann/upload-thomasar/blob/180d891f5e33faeb66dce5012eb5ec21b6287e3e/src/app/_components/files/fileList.tsx#L11-L17