Skip to content

Commit

Permalink
portal: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
yangshun committed Jun 25, 2024
1 parent 167bd5e commit d2fdffb
Show file tree
Hide file tree
Showing 7 changed files with 200 additions and 17 deletions.
4 changes: 2 additions & 2 deletions apps/portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"dependencies": {
"@headlessui/react": "^1.7.3",
"@heroicons/react": "^2.0.11",
"@heroicons/react": "2.0.11",
"@next-auth/prisma-adapter": "^1.0.4",
"@popperjs/core": "^2.11.6",
"@prisma/client": "^4.4.0",
Expand All @@ -32,7 +32,7 @@
"cross-fetch": "^3.1.5",
"date-fns": "^2.29.3",
"formidable": "^2.0.1",
"next": "12.3.1",
"next": "13.4.1",
"next-auth": "~4.10.3",
"node-fetch": "^3.2.10",
"react": "18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/portal/src/components/global/AppShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function ProfileJewel() {
{
href: '/api/auth/signout',
name: 'Sign Out',
onClick: (event: MouseEvent) => {
onClick: (event: React.MouseEvent<HTMLAnchorElement>) => {
event.preventDefault();
signOut();
},
Expand Down
9 changes: 3 additions & 6 deletions apps/portal/src/components/resumes/ResumePdf.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import clsx from 'clsx';
import { useEffect, useState } from 'react';
import { Document, Page, pdfjs } from 'react-pdf';
import type { PDFDocumentProxy } from 'react-pdf/node_modules/pdfjs-dist';
import {
MagnifyingGlassMinusIcon,
MagnifyingGlassPlusIcon,
Expand All @@ -20,10 +19,6 @@ export default function ResumePdf({ url }: Props) {
const [pageWidth, setPageWidth] = useState(750);
const [componentWidth, setComponentWidth] = useState(780);

const onPdfLoadSuccess = (pdf: PDFDocumentProxy) => {
setNumPages(pdf.numPages);
};

const onPageResize = () => {
setComponentWidth(
document.querySelector('#pdfView')?.getBoundingClientRect().width ?? 780,
Expand All @@ -44,7 +39,9 @@ export default function ResumePdf({ url }: Props) {
file={url}
loading={<Spinner display="block" size="lg" />}
noData=""
onLoadSuccess={onPdfLoadSuccess}>
onLoadSuccess={(pdf) => {
setNumPages(pdf.numPages);
}}>
<div
style={{
paddingLeft: clsx(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import clsx from 'clsx';
import Image from 'next/future/image';
import Image from 'next/image';
import { useEffect, useState } from 'react';
import { Tab } from '@headlessui/react';

Expand Down
2 changes: 1 addition & 1 deletion apps/portal/src/server/router/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const createRouter = () => trpc.router<Context>();
**/
export function createProtectedRouter() {
return createRouter().middleware(({ ctx, next }) => {
if (!ctx.session || !ctx.session.user) {
if (!ctx.session?.user) {
throw new trpc.TRPCError({ code: 'UNAUTHORIZED' });
}
return next({
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"dependencies": {
"@headlessui/react": "^1.7.3",
"@heroicons/react": "^2.0.11",
"@heroicons/react": "2.0.11",
"clsx": "^1.2.1",
"next": "^12.3.1",
"tailwindcss": "^3.1.8"
Expand Down
Loading

0 comments on commit d2fdffb

Please sign in to comment.