Skip to content

Commit

Permalink
chore: typings fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeyAlmighty committed Mar 31, 2024
1 parent ca10c1f commit 5628a94
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion new-york-babies-web/src/components/Navigation.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useTable } from "../stores/TableContext";
import {ChangeEvent} from "react";

interface NavigationProps {
pageNumber: number;
Expand All @@ -13,7 +14,7 @@ export const Navigation = ({ pageNumber, totalPages }: NavigationProps) => {
updateOffset
} = useTable();

const handleChange = ({ target }: any) => updatePageSize(target.value)
const handleChange = (event: any) => updatePageSize(event.target.value)
const increaseOffset = () => updateOffset(offset + 1)
const decreaseOffset = () => updateOffset(offset - 1)

Expand Down
4 changes: 2 additions & 2 deletions new-york-babies-web/src/components/Search.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react';
import React, {useState, useEffect, ChangeEvent} from 'react';
import "./search.css"

interface SearchInputProps {
Expand All @@ -16,7 +16,7 @@ const SearchInput = ({ onSearch }: SearchInputProps) => {
return () => clearTimeout(delaySearch);
}, [searchTerm, onSearch]);

const handleInputChange = ({ target }: any) => setSearchTerm(target.value);;
const handleInputChange = (event: ChangeEvent<HTMLInputElement>) => setSearchTerm(event.target.value);

return (
<input
Expand Down
2 changes: 1 addition & 1 deletion target/classes/Baby.rest
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ GET localhost:8080/api/baby/pagination/0/10/firstName

###
# GET SEARCH
GET localhost:8080/api/baby/0/10/search?term="ichae"
GET localhost:8080/api/baby/search/0/10/firstName/ASC?term="ichae"

0 comments on commit 5628a94

Please sign in to comment.