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

Add your farms table reload on farm create #3515

Merged
merged 5 commits into from
Oct 16, 2024

Conversation

amiraabouhadid
Copy link
Contributor

Changes

  • add emit event farm-created from createfarm after farm is created
  • add listener in parent to receive event pass it down to userfarms
  • add prop in userfarms to update on user create

Related Issues

#3471

Tested Scenarios

  • created a farm, watched user farms table get reloaded after 30 seconds

Copy link
Contributor

@0oM4R 0oM4R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it load actually but it not visualized, i can't see the loading bar;
and when tried to test it on slow network, it never got reloaded

@amiraabouhadid
Copy link
Contributor Author

amiraabouhadid commented Oct 13, 2024

@0oM4R works, just wait 30 seconds after creating farm on regular network
https://www.loom.com/share/b1084b6950e749d890875ea0aebe51f0?sid=3dcf18c6-27b6-45e5-a734-30cc36ff9587

async function createFarm() {
try {
isCreating.value = true;
await gridStore.grid.farms.create({ name: props.name });
createCustomToast("Farm created successfully.", ToastType.success);
notifyDelaying();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you remove it? i think it will be better to notify the user that it will reload in a while

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added back

@amiraabouhadid amiraabouhadid merged commit 0e606c5 into development Oct 16, 2024
10 checks passed
@amiraabouhadid amiraabouhadid deleted the dev_add_your_farms_table_reload branch October 16, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants