Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
akawashiro committed Jul 29, 2023
1 parent 7c0181b commit a1f24c9
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions jendeley-frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function ShowText(text: string | undefined) {
function stringArrayFilterFn(
row: any,
id: string,
filterValue: string | number
filterValue: string | number,
) {
const authors = row.getValue(id) as string[];
const fv =
Expand Down Expand Up @@ -187,7 +187,7 @@ function CellHref(cell: MRT_Cell<ApiEntry>, row: MRT_Row<ApiEntry>) {
function useColumnDefs(
tableData: ApiDB,
setTableData: React.Dispatch<React.SetStateAction<ApiDB>>,
columnFilters: MRT_ColumnFiltersState
columnFilters: MRT_ColumnFiltersState,
): MRT_ColumnDef<ApiEntry>[] {
return useMemo<MRT_ColumnDef<ApiEntry>[]>(
() => [
Expand Down Expand Up @@ -293,7 +293,7 @@ function useColumnDefs(
enableEditing: false,
},
],
[tableData, setTableData]
[tableData, setTableData],
);
}

Expand All @@ -317,7 +317,7 @@ function App() {
"Fetching from DB because of changes in columnFilters or sorting. columnFilters = ",
columnFilters,
"sorting = ",
sorting
sorting,
);

fetchDB(columnFilters, setTableData, setConnectionError);
Expand Down
2 changes: 1 addition & 1 deletion jendeley-frontend/src/api_call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { genRequestGetDB } from "./requests";
function fetchDB(
columnFilters: MRT_ColumnFiltersState,
setTableData: React.Dispatch<React.SetStateAction<ApiDB>>,
setConnectionError: React.Dispatch<React.SetStateAction<boolean>>
setConnectionError: React.Dispatch<React.SetStateAction<boolean>>,
) {
const request = genRequestGetDB(columnFilters);
const REACT_APP_API_URL = process.env.REACT_APP_API_URL;
Expand Down
4 changes: 2 additions & 2 deletions jendeley-frontend/src/delete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function DeleteButton(props: any) {
tableData: ApiDB,
columnFilters: MRT_ColumnFiltersState,
setTableData: React.Dispatch<React.SetStateAction<ApiDB>>,
setConnectionError: React.Dispatch<React.SetStateAction<boolean>>
setConnectionError: React.Dispatch<React.SetStateAction<boolean>>,
) {
console.log("Delete " + id);

Expand Down Expand Up @@ -86,7 +86,7 @@ function DeleteButton(props: any) {
props.tableData,
props.columnFilters,
props.setTableData,
props.setConnectionError
props.setConnectionError,
)
}
autoFocus
Expand Down
4 changes: 2 additions & 2 deletions jendeley-frontend/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import App from "./App";
import reportWebVitals from "./reportWebVitals";

const root = ReactDOM.createRoot(
document.getElementById("root") as HTMLElement
document.getElementById("root") as HTMLElement,
);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
</React.StrictMode>,
);

// If you want to start measuring performance in your app, pass a function
Expand Down
10 changes: 5 additions & 5 deletions jendeley-frontend/src/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function RegisterWebWithDialog(props: any) {
const { enqueueSnackbar, closeSnackbar } = useSnackbar();

const handleWebUrlFieldChange = (
event: React.ChangeEvent<HTMLInputElement>
event: React.ChangeEvent<HTMLInputElement>,
) => {
const url: string = event.target.value;
setWebUrl(url);
Expand Down Expand Up @@ -237,7 +237,7 @@ function RegisterPDFFromFile(props: any) {
setFilenameError(!isValidFilename(f) && f !== "");
if (!isValidFilename(f) && f !== "") {
setFilenameErrorText(
"Non valid filename: " + f + ". Filename must end with .pdf."
"Non valid filename: " + f + ". Filename must end with .pdf.",
);
} else {
setFilenameErrorText("");
Expand Down Expand Up @@ -339,7 +339,7 @@ function RegisterPDFFromFile(props: any) {
fetchDB(
props.columnFilters,
props.setTableData,
props.setConnectionError
props.setConnectionError,
);
}
}
Expand Down Expand Up @@ -425,7 +425,7 @@ function RegisterPDFFromWeb(props: any) {
const { enqueueSnackbar, closeSnackbar } = useSnackbar();

const handlePdfUrlFieldChange = (
event: React.ChangeEvent<HTMLInputElement>
event: React.ChangeEvent<HTMLInputElement>,
) => {
const url: string = event.target.value;
setPdfUrl(url);
Expand All @@ -446,7 +446,7 @@ function RegisterPDFFromWeb(props: any) {
setFilenameError(!isValidFilename(f) && f !== "");
if (!isValidFilename(f) && f !== "") {
setFilenameErrorText(
"Non valid filename: " + f + ". Filename must end with .pdf."
"Non valid filename: " + f + ". Filename must end with .pdf.",
);
} else {
setFilenameErrorText("");
Expand Down
2 changes: 1 addition & 1 deletion jendeley-frontend/src/requests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { RequestGetDB } from "./api_schema";

function getValueFromColumnFilters(
columnFilters: MRT_ColumnFiltersState,
id: string
id: string,
): string | undefined {
let value: string | undefined = undefined;
for (const filter of columnFilters) {
Expand Down

0 comments on commit a1f24c9

Please sign in to comment.