jedireza/aqua

N00b Question: Create a form to search through users, as a user?

HE-is opened this issue · 1 comments

HE-is commented

I'm not quite sure how to go about doing this. I apologize for being so new to all this; I've learned heaps already and am very grateful to the work that has been put into Aqua.
I am trying to make a search/list form that's essentially the same as the one on the Admin/Users page. Except it will be on the homepage for regular users to view just the names and an info field of all other users, with the ability to filter and search, like the Admin/users form.
How should I go about doing this?

(I'm not asking for a copy-pasta, "do it for me" answer; I just don't know where to start, despite reading many guides on React and node)

Thanks!!

How should I go about doing this?

  • Modify or copy the api route handler(s) to fit your needs.
    • Who should be able to access the information? Do they need to be logged in?
    • How can they filter the data?
    • What information do you return? Be careful to not send back more than you want people to see.
  • Copy the front-end assets from the admin page and adapt them to fit your needs.
    • React components
    • Stores and reducers
    • Actions

That's the high-level overview. More importantly study have the existing code paths get executed and how to customize them, then you should be able to adapt and/or copy what's there to create new stuff.

I hope that helps. Feel free to ask follow up questions on this thread.