File tree 7 files changed +200
-17
lines changed
7 files changed +200
-17
lines changed Original file line number Diff line number Diff line change 17
17
},
18
18
"dependencies" : {
19
19
"@headlessui/react" : " ^1.7.3" ,
20
- "@heroicons/react" : " ^ 2.0.11" ,
20
+ "@heroicons/react" : " 2.0.11" ,
21
21
"@next-auth/prisma-adapter" : " ^1.0.4" ,
22
22
"@popperjs/core" : " ^2.11.6" ,
23
23
"@prisma/client" : " ^4.4.0" ,
32
32
"cross-fetch" : " ^3.1.5" ,
33
33
"date-fns" : " ^2.29.3" ,
34
34
"formidable" : " ^2.0.1" ,
35
- "next" : " 12.3 .1" ,
35
+ "next" : " 13.4 .1" ,
36
36
"next-auth" : " ~4.10.3" ,
37
37
"node-fetch" : " ^3.2.10" ,
38
38
"react" : " 18.2.0" ,
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ function ProfileJewel() {
68
68
{
69
69
href : '/api/auth/signout' ,
70
70
name : 'Sign Out' ,
71
- onClick : ( event : MouseEvent ) => {
71
+ onClick : ( event : React . MouseEvent < HTMLAnchorElement > ) => {
72
72
event . preventDefault ( ) ;
73
73
signOut ( ) ;
74
74
} ,
Original file line number Diff line number Diff line change 1
1
import clsx from 'clsx' ;
2
2
import { useEffect , useState } from 'react' ;
3
3
import { Document , Page , pdfjs } from 'react-pdf' ;
4
- import type { PDFDocumentProxy } from 'react-pdf/node_modules/pdfjs-dist' ;
5
4
import {
6
5
MagnifyingGlassMinusIcon ,
7
6
MagnifyingGlassPlusIcon ,
@@ -20,10 +19,6 @@ export default function ResumePdf({ url }: Props) {
20
19
const [ pageWidth , setPageWidth ] = useState ( 750 ) ;
21
20
const [ componentWidth , setComponentWidth ] = useState ( 780 ) ;
22
21
23
- const onPdfLoadSuccess = ( pdf : PDFDocumentProxy ) => {
24
- setNumPages ( pdf . numPages ) ;
25
- } ;
26
-
27
22
const onPageResize = ( ) => {
28
23
setComponentWidth (
29
24
document . querySelector ( '#pdfView' ) ?. getBoundingClientRect ( ) . width ?? 780 ,
@@ -44,7 +39,9 @@ export default function ResumePdf({ url }: Props) {
44
39
file = { url }
45
40
loading = { < Spinner display = "block" size = "lg" /> }
46
41
noData = ""
47
- onLoadSuccess = { onPdfLoadSuccess } >
42
+ onLoadSuccess = { ( pdf ) => {
43
+ setNumPages ( pdf . numPages ) ;
44
+ } } >
48
45
< div
49
46
style = { {
50
47
paddingLeft : clsx (
Original file line number Diff line number Diff line change 1
1
import clsx from 'clsx' ;
2
- import Image from 'next/future/ image' ;
2
+ import Image from 'next/image' ;
3
3
import { useEffect , useState } from 'react' ;
4
4
import { Tab } from '@headlessui/react' ;
5
5
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export const createRouter = () => trpc.router<Context>();
47
47
**/
48
48
export function createProtectedRouter ( ) {
49
49
return createRouter ( ) . middleware ( ( { ctx, next } ) => {
50
- if ( ! ctx . session || ! ctx . session . user ) {
50
+ if ( ! ctx . session ? .user ) {
51
51
throw new trpc . TRPCError ( { code : 'UNAUTHORIZED' } ) ;
52
52
}
53
53
return next ( {
Original file line number Diff line number Diff line change 23
23
},
24
24
"dependencies" : {
25
25
"@headlessui/react" : " ^1.7.3" ,
26
- "@heroicons/react" : " ^ 2.0.11" ,
26
+ "@heroicons/react" : " 2.0.11" ,
27
27
"clsx" : " ^1.2.1" ,
28
28
"next" : " ^12.3.1" ,
29
29
"tailwindcss" : " ^3.1.8"
You can’t perform that action at this time.
0 commit comments