File tree Expand file tree Collapse file tree 1 file changed +2
-23
lines changed
src/app/(authenticated)/(dashboard)/[publicId]/updates/[updatePublicId] Expand file tree Collapse file tree 1 file changed +2
-23
lines changed Original file line number Diff line number Diff line change 1
1
"use server" ;
2
- import type { ExtendedRecipientType } from "@/components/common/share-modal" ;
3
2
import { db } from "@/server/db" ;
4
- import { api } from "@/trpc/server" ;
5
-
6
3
import dynamic from "next/dynamic" ;
7
4
8
5
const Editor = dynamic (
@@ -16,35 +13,17 @@ const getUpdate = async (publicId: string) => {
16
13
} ) ;
17
14
} ;
18
15
19
- const getContacts = async ( ) => {
20
- return await api . common . getContacts . query ( ) ;
21
- } ;
22
-
23
16
const UpdatePage = async ( {
24
17
params : { publicId, updatePublicId } ,
25
18
} : {
26
19
params : { publicId : string ; updatePublicId : string } ;
27
20
} ) => {
28
- const contacts = await getContacts ( ) ;
29
-
30
21
if ( updatePublicId === "new" ) {
31
- return < Editor companyPublicId = { publicId } contacts = { contacts } mode = "new" /> ;
22
+ return < Editor companyPublicId = { publicId } mode = "new" /> ;
32
23
}
33
24
const update = await getUpdate ( updatePublicId ) ;
34
- const recipients = await api . update . getRecipiants . query ( {
35
- updateId : update ?. id ,
36
- publicUpdateId : update . publicId ,
37
- } ) ;
38
25
39
- return (
40
- < Editor
41
- companyPublicId = { publicId }
42
- update = { update }
43
- contacts = { contacts }
44
- recipients = { recipients as object [ ] as ExtendedRecipientType [ ] }
45
- mode = "edit"
46
- />
47
- ) ;
26
+ return < Editor companyPublicId = { publicId } update = { update } mode = "edit" /> ;
48
27
} ;
49
28
50
29
export default UpdatePage ;
You can’t perform that action at this time.
0 commit comments