Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Linda-fintlabs committed Apr 14, 2024
1 parent 944d7d3 commit dd56720
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/components/resource-admin/ResourceDetailTable.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {Table} from "@navikt/ds-react";
import type {IResource} from "~/data/types";
import {IResource} from "~/data/types";
import React from "react";

export const ResourceDetailTable: any = (props: { resource: IResource }) => {
export const ResourceDetailTable = (props: { resource: IResource }) => {

return (
<>
Expand Down
8 changes: 4 additions & 4 deletions app/components/user/UserTable.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import {Button, Pagination, Select, Table} from "@navikt/ds-react";
import {InformationSquareIcon} from "@navikt/aksel-icons";
import {Form, useNavigate, useSearchParams} from "@remix-run/react";
import {IUserPage} from "~/data/types";
import {IUser, IUserPage} from "~/data/types";
import React from "react";

interface UserTableProps {
userPage: IUserPage
size: string
page: string
}
export const UserTable = ( {userPage, size, page}: UserTableProps) => {

export const UserTable = ({userPage, size}: UserTableProps) => {

const navigate = useNavigate();
const [, setSearchParams] = useSearchParams()
Expand All @@ -34,7 +34,7 @@ export const UserTable = ( {userPage, size, page}: UserTableProps) => {
</Table.Row>
</Table.Header>
<Table.Body>
{userPage.users.map((user) => (
{userPage.users.map((user: IUser) => (
<Table.Row key={user.id}>
<Table.HeaderCell scope="row">{user.fullName}</Table.HeaderCell>
<Table.DataCell>{user.organisationUnitName}</Table.DataCell>
Expand Down
6 changes: 3 additions & 3 deletions app/routes/resource-admin.$id.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export async function loader({params, request}: LoaderFunctionArgs) {
})
}

export function useResourceByIdLoaderData() {
return useRouteLoaderData<typeof loader>("resource.$id")
}
// export function useResourceByIdLoaderData() {
// return useRouteLoaderData<typeof loader>("resource.$id")
// }

export default function ResourceById() {
const data = useLoaderData<{
Expand Down
2 changes: 1 addition & 1 deletion app/routes/users._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function UsersIndex() {
}}>Fjern orgenhetsfilter</Chips.Removable>
)}
</Box>
<UserTable userPage={data.userList}/>
<UserTable userPage={data.userList} size={"10"}/>
</div>
);
}

0 comments on commit dd56720

Please sign in to comment.