File tree Expand file tree Collapse file tree 1 file changed +20
-20
lines changed Expand file tree Collapse file tree 1 file changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -121,34 +121,34 @@ export default function PdfViewer({ url, name }: PdfViewerProps) {
121
121
< DialogTrigger >
122
122
< FaShare > </ FaShare >
123
123
</ DialogTrigger >
124
- < DialogContent className = "max-w-96" >
124
+ < DialogContent className = "max-w-96 " >
125
125
< DialogHeader >
126
126
< DialogTitle > Share Papers with your friends!</ DialogTitle >
127
127
< DialogDescription >
128
128
Either scan the QR or copy the link and share
129
129
</ DialogDescription >
130
130
</ DialogHeader >
131
- < div className = "flex justify-center space-x-4 " >
131
+ < div className = "flex flex-col items-center justify-center gap-5 " >
132
132
< QR url = { paperPath } > </ QR >
133
+ < Button
134
+ type = "submit"
135
+ size = "sm"
136
+ className = "flex w-fit items-center justify-between gap-5 px-3"
137
+ onClick = { async ( ) => {
138
+ await toast . promise (
139
+ navigator . clipboard . writeText ( paperPath ) , // This is a promise
140
+ {
141
+ success : "Link copied successfully" ,
142
+ loading : "Copying link..." ,
143
+ error : "Error copying link" ,
144
+ } ,
145
+ ) ;
146
+ } }
147
+ >
148
+ < p > Copy Link To Clipboard</ p >
149
+ < Copy />
150
+ </ Button >
133
151
</ div >
134
- < Button
135
- type = "submit"
136
- size = "sm"
137
- className = "px-3"
138
- onClick = { async ( ) => {
139
- await toast . promise (
140
- navigator . clipboard . writeText ( paperPath ) , // This is a promise
141
- {
142
- success : "Link copied successfully" ,
143
- loading : "Copying link..." ,
144
- error : "Error copying link" ,
145
- } ,
146
- ) ;
147
- } }
148
- >
149
- < span className = "sr-only" > Copy</ span >
150
- < Copy />
151
- </ Button >
152
152
</ DialogContent >
153
153
</ Dialog >
154
154
</ div >
You can’t perform that action at this time.
0 commit comments