Skip to content

Commit 12eae16

Browse files
committed
ui: fix
Signed-off-by: Viktor Login <[email protected]>
1 parent 52c2dce commit 12eae16

File tree

12 files changed

+187
-154
lines changed

12 files changed

+187
-154
lines changed

boundaries/proxy/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"fp-ts": "2.16.11",
4242
"google-protobuf": "^4.0.0",
4343
"helmet": "^8.1.0",
44-
"inversify": "^7.7.1",
44+
"inversify": "^7.8.1",
4545
"inversify-express-utils": "^6.5.0",
4646
"inversify-logger-middleware": "^3.1.0",
4747
"jaeger-client": "^3.19.0",
@@ -56,5 +56,6 @@
5656
"@types/node": "22.17.2",
5757
"prisma": "6.14.0",
5858
"typescript": "^5.9.2"
59-
}
59+
},
60+
"packageManager": "[email protected]+sha512.ad27a79641b49c3e481a16a805baa71817a04bbe06a38d17e60e2eaee83f6a146c6a688125f5792e48dd5ba30e7da52a5cda4c3992b9ccf333f9ce223af84748"
6061
}

boundaries/proxy/pnpm-lock.yaml

Lines changed: 143 additions & 137 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/src/app/add-link/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ function Page() {
3131
hash: '',
3232
})
3333

34-
const handleChange = (e: { target: { name: any; value: any } }) => setURL({ ...url, [e.target.name]: e.target.value })
34+
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => setURL({ ...url, [e.target.name]: e.target.value })
3535

36-
const handleClose = (event: any, reason: string) => {
36+
const handleClose = (event: React.SyntheticEvent | Event, reason: string) => {
3737
if (reason === 'clickaway') {
3838
return
3939
}

ui/src/app/providers.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const theme = createTheme({
4646
// })
4747

4848
// @ts-ignore
49-
export function Providers({ children, ...props }) {
49+
export function Providers({ children, ...props }: { children: React.ReactNode; [key: string]: any }) {
5050
const storeRef = useRef<AppStore | null>(null)
5151
if (!storeRef.current) {
5252
// Create the store instance the first time this renders

ui/src/components/Header/notification.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import IconButton from '@mui/material/IconButton'
55
import Menu from '@mui/material/Menu'
66
import * as React from 'react'
77

8-
export default function Notification(): JSX.Element {
8+
export default function Notification(): React.JSX.Element {
99
const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null)
1010
const open = Boolean(anchorEl)
1111
const handleClick = (event: React.MouseEvent<HTMLElement>) => {

ui/src/components/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import ory from '../pkg/sdk'
1010
import { AxiosError } from 'axios'
1111

1212
// @ts-ignore
13-
export function Layout({ children }) {
13+
export function Layout({ children }: { children: React.ReactNode }) {
1414
const [session, setSession] = useState<string>('No valid Ory Session was found.\nPlease sign in to receive one.')
1515
const [hasSession, setHasSession] = useState<boolean>(false)
1616
const [open, setOpen] = useState(false)

ui/src/components/Page/admin/user/linksTable.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,19 @@ import { formatRelative } from 'date-fns'
55
import { ContentCopy } from '@mui/icons-material'
66

77
type AppProps = {
8-
data: any
8+
data: Array<{
9+
url: string
10+
hash: string
11+
describe?: string
12+
createdAt: string
13+
updatedAt: string
14+
}>
15+
}
16+
17+
type CellProps = {
18+
cell: {
19+
getValue: () => string
20+
}
921
}
1022

1123
const columns = [
@@ -41,7 +53,7 @@ const columns = [
4153
filterVariant: 'date',
4254
filterFn: 'lessThan',
4355
sortingFn: 'datetime',
44-
Cell: ({ cell }: any) =>
56+
Cell: ({ cell }: CellProps) =>
4557
formatRelative(new Date(cell.getValue()), new Date(), {
4658
// @ts-ignore
4759
addSuffix: true,
@@ -59,7 +71,7 @@ const columns = [
5971
filterVariant: 'date',
6072
filterFn: 'lessThan',
6173
sortingFn: 'datetime',
62-
Cell: ({ cell }: any) =>
74+
Cell: ({ cell }: CellProps) =>
6375
formatRelative(new Date(cell.getValue()), new Date(), {
6476
// @ts-ignore
6577
addSuffix: true,

ui/src/components/Page/user/linksTable.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,23 @@ import { formatRelative } from 'date-fns'
55
import { ContentCopy } from '@mui/icons-material'
66

77
type AppProps = {
8-
data: any
8+
data: Array<{
9+
url: string
10+
hash: string
11+
describe?: string
12+
created_at: string
13+
updated_at: string
14+
}>
915

1016
onRefresh?: () => void
1117
}
1218

19+
type CellProps = {
20+
cell: {
21+
getValue: () => string
22+
}
23+
}
24+
1325
const columns = [
1426
{
1527
accessorKey: 'url',
@@ -43,7 +55,7 @@ const columns = [
4355
filterVariant: 'date',
4456
filterFn: 'lessThan',
4557
sortingFn: 'datetime',
46-
Cell: ({ cell }: any) =>
58+
Cell: ({ cell }: CellProps) =>
4759
formatRelative(new Date(cell.getValue()), new Date(), {
4860
// @ts-ignore
4961
addSuffix: true,
@@ -61,7 +73,7 @@ const columns = [
6173
filterVariant: 'date',
6274
filterFn: 'lessThan',
6375
sortingFn: 'datetime',
64-
Cell: ({ cell }: any) =>
76+
Cell: ({ cell }: CellProps) =>
6577
formatRelative(new Date(cell.getValue()), new Date(), {
6678
// @ts-ignore
6779
addSuffix: true,

ui/src/components/Profile/Personal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import * as React from 'react'
33
import _ from 'lodash'
44

5-
export default function Personal({ session }) {
5+
export default function Personal({ session }: { session: string }) {
66
return (
77
<div className="mt-10 sm:mt-0">
88
<div className="md:grid md:grid-cols-3 md:gap-6">

ui/src/components/Profile/Welcome.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @ts-nocheck
22

3-
export default function Welcome({ nickname }) {
3+
export default function Welcome({ nickname }: { nickname: string }) {
44
return (
55
<div className="md:w-auto flex items-center content-center my-6 flex-auto bg-indigo-600 text-white rounded shadow-xl px-5 w-full">
66
<div className="flex flex-wrap content-center items-center">

0 commit comments

Comments
 (0)