Modrinth/utils/report-helpers.ts
Carter accc53c5dd
Implement Editor MOD-349 (#1427)
* Implement Editor

* content oveflow fix for description

* Description card fix

* make everything fix in report modal

* seperate report page with image upload

* Bump Omorphia

* Update pages/report.vue

Co-authored-by: Emma Alexia <emma@modrinth.com>

* suggested changes and cleanup

* fix button spacing

* clean up and replace report implementations

* corepack fix

* Remove ModalReport

* image uploads for conversations

* image uploading context for versions and threads

* adjust information about thread messages

* Update pages/report.vue

Co-authored-by: Emma Alexia <emma@modrinth.com>

* Adjust image upload imports

* fix api changes for useImageUpload

* correct report redirection uri

* report button feedback

* omorphia ver bump

---------

Co-authored-by: Emma Alexia <emma@modrinth.com>
2023-11-29 11:56:17 -07:00

22 lines
460 B
TypeScript

const startReport = (type: string, id: string) => {
const prefill = new URLSearchParams()
// type
prefill.set('item', type)
prefill.set('itemID', id)
navigateTo('/report?' + prefill.toString())
}
export const reportProject = (id: string) => {
return startReport('project', id)
}
export const reportVersion = (id: string) => {
return startReport('version', id)
}
export const reportUser = (id: string) => {
return startReport('user', id)
}