Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to revisit the links they create #74

Open
statictype opened this issue Sep 8, 2022 · 4 comments
Open

Allow users to revisit the links they create #74

statictype opened this issue Sep 8, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@statictype
Copy link
Contributor

A links overview page was introduced here #20 but i removed it from the MVP.
I think it might be cleaner to use react-router instead of HeadlessUI tabs, but the layout can be copy-pasted.
Maybe we should limit to displaying 15 links, the list can grow fast.

Is there a way to get all the links shortened by an account from contract storage?

@statictype statictype added the enhancement New feature or request label Sep 8, 2022
@DoubleOTheven
Copy link
Contributor

We should add the author to the even that gets emitted in shorten(). Then we can query for all events and filter by the author. (I'm not sure if this is convenient in PolkadotJS. In EVM this is quite easy). If it is not easy, then I think we should focus on this as a new feature set for ink!

Have you done much with querying all events from a contract from the beginning of time? I know you can do it for a particular block. @statictype

@DoubleOTheven
Copy link
Contributor

I do not see any user account data stored in the contract so we cannot currently get the user's stored links. We can support this feature if we do an upgrade. I would lean towards relying on events over storage. Plus it will force us to really fine tune that feature in both the front end and contract level

@statictype
Copy link
Contributor Author

We could also store them in local storage, i think this is how it was meant initially

@DoubleOTheven
Copy link
Contributor

That could work in the short run, but it is not ideal IMO. I think we should upgrade the contract

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants