Updated links model and poll page (#206)

* Improved sharing
* Updated desktop poll
This commit is contained in:
Luke Vella 2022-06-27 15:22:23 +01:00 committed by GitHub
parent c4cbf2f6bb
commit 2ead375b42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 955 additions and 1848 deletions

View file

@ -95,7 +95,7 @@ const Page: NextPage<CreatePollPageProps> = ({
const plausible = usePlausible();
const createPoll = trpc.useMutation(["polls.create"], {
onSuccess: (poll) => {
onSuccess: (res) => {
setIsRedirecting(true);
plausible("Created poll", {
props: {
@ -104,7 +104,7 @@ const Page: NextPage<CreatePollPageProps> = ({
},
});
setPersistedFormData(initialNewEventData);
router.replace(`/admin/${poll.urlId}`);
router.replace(`/admin/${res.urlId}?sharing=true`);
},
});