Skip to content

Commit

Permalink
build fix: Address a couple of ESLint complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
beverloo committed Feb 23, 2025
1 parent 3978cdf commit 35b58da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions app/admin/events/[event]/finance/SalesUploadSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function salesUpload(eventSlug: string, formData: unknown) {
return executeServerAction(formData, kSalesUploadData, async (data, props) => {
const event = await getEventBySlug(eventSlug);
if (!event)
return { success: false, error: 'The right event could not be selected on the server…' };
return { success: false, error: 'The event could not be selected on the server…' };

const uploadedReportData = await data.file[0].text();
const uploadedReportLines = uploadedReportData.split(/\r?\n/);
Expand Down Expand Up @@ -68,7 +68,7 @@ export async function salesUpload(eventSlug: string, formData: unknown) {
for (const uploadedReportLine of uploadedReportLines) {
const report = uploadedReportLine.trim().split(separator);
if (report.length !== fields.length)
return { success: false, error: 'The selected file contains inconsistent data…' };
return { success: false, error: 'The selected file contains corrupted data…' };

salesData.push(Object.fromEntries(report.map((value, index) =>
[ fields[index], value ])));
Expand All @@ -78,9 +78,9 @@ export async function salesUpload(eventSlug: string, formData: unknown) {
if (!salesData.length)
return { success: false, error: 'The select file contains no sales data…' };

// ---------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------
// Actually upload the `data` to the database.
// ---------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------

const dbInstance = db;

Expand Down
2 changes: 1 addition & 1 deletion app/admin/events/[event]/finance/graphs/SalesGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export interface SalesGraphProps {
* to work in the Volunteer Manager. Input are the series, axis contents, and optional configuration
* to specialise the default display.
*/
export async function SalesGraph(props: SalesGraphProps) {
export function SalesGraph(props: SalesGraphProps) {
const clipPathId = useId();

return (
Expand Down
1 change: 0 additions & 1 deletion app/api/admin/event/finance/[[...id]]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { notFound } from 'next/navigation';
import { z } from 'zod';

import { type DataTableEndpoints, createDataTableApi } from '../../../../createDataTableApi';
import { Log, kLogSeverity, kLogType } from '@lib/Log';
import { executeAccessCheck } from '@lib/auth/AuthenticationContext';
import { getEventBySlug } from '@lib/EventLoader';
import db, { tEventsSalesConfiguration, tEventsSales } from '@lib/database';
Expand Down

0 comments on commit 35b58da

Please sign in to comment.