You've already forked AstralRinth
forked from didirus/AstralRinth
Migrate to Turborepo (#1251)
This commit is contained in:
21
apps/frontend/src/utils/report-helpers.ts
Normal file
21
apps/frontend/src/utils/report-helpers.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user