stacker.news/components
ekzyis 687d71f246
Purchase archived territories (#897)
* Handle archived territories in territory form

* Use dedicated mutation

* Add sanity check for eternal territories

* Fix fields and cost ignored

* Remove no longer needed manual validation in upsertSub

* Remove founder check

* Always check if sub is archived

Using { abortEarly: false } now since previously, if no description was not given, we wouldn't detect if the sub was archived since validation would abort on empty descriptions.

Only on submission all fields would get validated but since we ignore archived errors during submission, the user would never see that the sub is archived before submission
+ the wrong mutation would run if archived is not already true before submission.

Hence, we need to validate all fields always.

There is currently still a bug where the validation does not immediately run but maybe this can be fixed by simply using validateImmediately on the Formik component.

* Fix archived warning not shown after first render

* Only create transfers if owner actually changes

* Reuse helper functions in lib/territory.js

* Rename var to editing

* Use onChange instead of validation override

* Run same validation on server for unarchiving

* Fix 'territory archived' shown during edits

* Use && instead of ternary operator for conditional query

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2024-03-19 17:23:59 -05:00
..
webln Use progress bar for pending payments (#873) 2024-02-24 14:33:08 -06:00
accordian-item.js territories 2023-12-04 21:34:06 -06:00
action-dropdown.js Quote reply support on text-based posts and comments (#526) 2023-10-03 20:12:12 -05:00
action-tooltip.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
adv-post-form.js Nostr crossposting all item types (#779) 2024-02-21 19:18:36 -06:00
adv-post-form.module.css fix height of foward percent on validation err 2023-09-12 17:04:49 -05:00
autowithdraw-shared.js LND autowithdraw (#806) 2024-02-13 13:17:56 -06:00
avatar.js Image uploads (#576) 2023-11-06 14:53:33 -06:00
banners.js replace welcome banner with msm banner 2024-03-04 16:51:36 -06:00
banners.module.css Add new visitor welcome banner (#418) 2023-09-11 16:29:45 -05:00
block-height.js Fix image rerender jitter and layout shift (#896) 2024-03-06 13:53:46 -06:00
bolt11-info.js autowithdraw to lightning address 2024-01-11 13:10:07 -06:00
bookmark.js Toast (#431) 2023-08-25 18:21:51 -05:00
bounty-form.js Nostr crossposting all item types (#779) 2024-02-21 19:18:36 -06:00
cancel-button.js make fee button less of a hack 2023-11-10 18:18:10 -06:00
chain-fee.js Fix image rerender jitter and layout shift (#896) 2024-03-06 13:53:46 -06:00
charts.js improve stat gathering 2024-01-19 15:19:26 -06:00
comment-edit.js refactor delete notification (#731) 2024-01-03 16:24:46 -06:00
comment.js render outlawed images and links as text 2024-03-04 19:29:50 -06:00
comment.module.css refine bounty icon margin for wrapping in comments 2024-03-06 14:20:03 -06:00
comments.js Allow territory founders to pin items (#767) 2024-01-30 11:04:56 -06:00
countdown.js territories 2023-12-04 21:34:06 -06:00
dark-mode.js dark-mode needs to block block 2023-08-04 20:45:12 -05:00
delete.js Provide option to clear withdrawal invoices (#591) 2023-11-09 11:50:43 -06:00
discussion-form.js API Keys (#915) 2024-03-14 15:32:34 -05:00
dont-link-this.js Allow zap undo's for short period of time (#857) 2024-02-21 18:48:42 -06:00
error-boundary.js Fix client-side error boundary (#623) 2023-11-19 14:24:56 -06:00
fee-button.js make anon fees consistent 2023-12-10 16:56:22 -06:00
fee-button.module.css small receipt styling 2023-11-10 09:22:14 -06:00
footer-rewards.js Monthly rewards (#890) 2024-03-01 10:28:55 -06:00
footer.js Changed my nym to ek (#844) 2024-02-16 12:25:43 -06:00
footer.module.css fix dark mode 2023-08-04 19:21:51 -05:00
form.js Purchase archived territories (#897) 2024-03-19 17:23:59 -05:00
form.module.css Custom date selector for more pages (#567) 2023-11-08 18:15:36 -06:00
hat.js better organize user graphql types 2023-11-09 19:05:35 -06:00
header.js try url object with next/link to fix #822 2024-02-13 19:44:03 -06:00
header.module.css Fix link to profile matching current URL, not profile (#395) 2023-08-15 12:54:24 -05:00
hidden-wallet-summary.js merge non-normalized user subtypes fixing #645 2023-11-20 09:05:02 -06:00
image.js add sndev shell script and enhance docker compose local dev 2024-03-13 09:04:09 -05:00
info.js Fix alignment of info icon (#895) 2024-03-05 16:27:29 -06:00
invite.js full powered editing 2022-08-18 13:15:24 -05:00
invoice-status.js make anon posting less hidden, add anon info button explainer 2023-08-10 14:41:56 -05:00
invoice.js Use progress bar for pending payments (#873) 2024-02-24 14:33:08 -06:00
invoice.module.css ready for invoices 2021-05-06 16:15:22 -05:00
item-act.js Fix out of order undos for turbo zaps (#883) 2024-02-26 18:10:43 -06:00
item-full.js render outlawed images and links as text 2024-03-04 19:29:50 -06:00
item-info.js better link rel attr handling 2024-03-04 19:20:14 -06:00
item-job.js add sndev shell script and enhance docker compose local dev 2024-03-13 09:04:09 -05:00
item.js Change poll icon color when active (#680) (#898) 2024-03-06 14:02:48 -06:00
item.module.css add numbering to top stacker and territories 2024-02-14 15:06:42 -06:00
items.js Fix pinned items don't show up in home 2024-02-04 22:15:18 +01:00
items.module.css working search 2022-01-27 13:18:48 -06:00
job-form.js add sndev shell script and enhance docker compose local dev 2024-03-13 09:04:09 -05:00
layout.js better search layout spacing 2023-10-26 13:01:01 -05:00
layout.module.css Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
lightning-auth.js remove slashtags completely 2023-08-17 13:40:21 -05:00
lightning-auth.module.css Notifications with nostr info (#368) 2023-08-08 13:19:31 -05:00
lightning.js Revert "halloween animation" 2023-11-01 11:57:55 -05:00
link-form.js Nostr crossposting all item types (#779) 2024-02-21 19:18:36 -06:00
logger.js Only close notifications manually on iOS (#729) 2024-01-03 11:56:29 -06:00
login-button.js remove slashtags completely 2023-08-17 13:40:21 -05:00
login.js remove slashtags completely 2023-08-17 13:40:21 -05:00
login.module.css more invite work 2021-10-15 13:05:34 -05:00
me.js merge non-normalized user subtypes fixing #645 2023-11-20 09:05:02 -06:00
modal.js refactor: replace recursion with promise sequence in `useInvoiceable` (#752) 2024-01-16 18:40:11 -06:00
more-footer.js search/related posts refinements 2024-01-17 17:39:48 -06:00
mute.js mutes 2023-09-28 15:02:25 -05:00
nostr-auth.js add timeouts for nostr extension calls 2023-12-19 16:01:48 -06:00
notifications.js Territory transfers (#878) 2024-03-05 13:56:02 -06:00
notifications.module.css remove list jitter by initially preferring ssr 2023-08-06 13:04:25 -05:00
page-loading.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
past-bounties.js upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
pay-bounty.js unify zap/downzap/bounty mutation 2023-12-26 16:51:47 -06:00
pay-bounty.module.css upgrade react-bootstrap 2023-07-24 13:53:53 -05:00
payer-data.js LUD-18 Service Support (#518) 2023-10-03 14:35:53 -05:00
poll-form.js Nostr crossposting all item types (#779) 2024-02-21 19:18:36 -06:00
poll.js Make poll expiration configurable (#860) 2024-02-21 12:18:43 -06:00
poll.module.css increase poll choice length to 40 chars 2023-09-28 16:52:11 -05:00
post.js refine territory details on post form 2024-01-08 19:02:00 -06:00
price.js Add chain fees to price carousel (#658) 2023-12-20 16:06:22 -06:00
qr.js Fix QR code interaction with WebLN provider (#834) 2024-02-15 11:20:15 -06:00
recent-header.js territories 2023-12-04 21:34:06 -06:00
related.js search/related posts refinements 2024-01-17 17:39:48 -06:00
reply.js improved comment linking 2024-01-17 19:03:49 -06:00
reply.module.css add spacing to comment reply button 2023-10-26 12:17:43 -05:00
root.js improve comment performance 2023-05-06 16:51:17 -05:00
search.js fix custom dates to use ms since epoch 2023-11-14 10:23:44 -06:00
search.module.css Add a date selector to the search function (#494) 2023-10-04 14:44:06 -05:00
seo.js use capture microservice 2024-01-30 18:22:40 -06:00
serviceworker.js Fix usage of hardcoded strings for sw message types (#730) 2024-01-03 14:02:01 -06:00
share.js Add setting for no referral links on copy 2024-03-17 16:23:03 +01:00
snl.js add removed snl banner 2023-08-25 18:43:50 -05:00
snow.js Christmas zaps (#707) 2023-12-24 16:49:41 -06:00
sub-select.js Add nsfw setting to territories (#788) 2024-02-09 20:35:32 -06:00
sub-select.module.css refine territory details on post form 2024-01-08 19:02:00 -06:00
subscribe.js Toast (#431) 2023-08-25 18:21:51 -05:00
subscribeUser.js Proposal: User Subscriptions: separate posts and comments (#470) 2023-09-18 13:20:02 -05:00
table-of-contents.js handle hash urls with 'view more' 2023-12-20 18:16:34 -06:00
territory-form.js Purchase archived territories (#897) 2024-03-19 17:23:59 -05:00
territory-header.js Territory transfers (#878) 2024-03-05 13:56:02 -06:00
territory-list.js add numbering to top stacker and territories 2024-02-14 15:06:42 -06:00
territory-payment-due.js Make territory billing period changeable (#840) 2024-02-16 12:25:12 -06:00
territory-transfer.js Territory transfers (#878) 2024-03-05 13:56:02 -06:00
text.js Fix ToC due to repeated slug calls 2024-03-17 18:24:39 +01:00
text.module.css Fix image rerender jitter and layout shift (#896) 2024-03-06 13:53:46 -06:00
toast.js Fix out of order undos for turbo zaps (#883) 2024-02-26 18:10:43 -06:00
toast.module.css Use progress bar for pending payments (#873) 2024-02-24 14:33:08 -06:00
top-header.js Monthly rewards (#890) 2024-03-01 10:28:55 -06:00
upvote.js Fix zap shadow on hover (#906) 2024-03-13 11:48:16 -05:00
upvote.module.css fix dark mode 2023-08-04 19:21:51 -05:00
usage-header.js fix custom dates to use ms since epoch 2023-11-14 10:23:44 -06:00
use-crossposter.js Nostr crossposting all item types (#779) 2024-02-21 19:18:36 -06:00
use-data.js remove list jitter by initially preferring ssr 2023-08-06 13:04:25 -05:00
use-debounce-callback.js remove unused debounce callback deps 2023-10-06 16:34:16 -05:00
use-no-initial-effect.js reuse debounce hook more places 2023-10-06 15:01:51 -05:00
use-quote-reply.js refine quote reply hook and #643 2023-11-21 12:35:37 -06:00
user-header.js add sndev shell script and enhance docker compose local dev 2024-03-13 09:04:09 -05:00
user-header.module.css Don't hide self in top even if hidden (#905) 2024-03-13 19:26:59 -05:00
user-list.js Don't hide self in top even if hidden (#905) 2024-03-13 19:26:59 -05:00
wallet-card.js Expose WebLN interface via React Context (#749) 2024-02-08 12:33:13 -06:00