Skip to content

Commit

Permalink
pnpm biome check --write --unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamoss committed Oct 19, 2024
1 parent 58aea9e commit 46e68c4
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 16 deletions.
4 changes: 2 additions & 2 deletions admin-redesign/src/ErrorElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { createInlinedSVGImage } from './features/icons/svgHelpers';
const StyledInteractableBoxFullHeight = styled(Box)(() => ({
backgroundColor: mapaThemePrimaryPurple,
overflowY: 'auto',
height: `100dvh`,
height: '100dvh',
paddingBottom: appBarHeight * 2,
}));

Expand Down Expand Up @@ -84,7 +84,7 @@ function ErrorElement() {
backgroundImage: `url('data:image/svg+xml;base64,${window.btoa(TilesBackgroundRaw)}')`,
p: 2,
}}
></Box>
/>

<Box
sx={{
Expand Down
4 changes: 2 additions & 2 deletions admin-redesign/src/NotFound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { createInlinedSVGImage } from './features/icons/svgHelpers';
const StyledInteractableBoxFullHeight = styled(Box)(() => ({
backgroundColor: mapaThemePrimaryPurple,
overflowY: 'auto',
height: `100dvh`,
height: '100dvh',
paddingBottom: appBarHeight * 2,
}));

Expand Down Expand Up @@ -84,7 +84,7 @@ function NotFound() {
backgroundImage: `url('data:image/svg+xml;base64,${window.btoa(TilesBackgroundRaw)}')`,
p: 2,
}}
></Box>
/>

<Box
sx={{
Expand Down
2 changes: 1 addition & 1 deletion admin-redesign/src/app/services/stalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export const stallsApi = api.injectEndpoints({
endpoints: (builder) => ({
getPendingStalls: builder.query<Stall[], void>({
query: () => ({
url: `stalls/pending/`,
url: 'stalls/pending/',
}),
}),
getStall: builder.query<Stall, { stallId: number; token: string; signature: string }>({
Expand Down
2 changes: 1 addition & 1 deletion admin-redesign/src/app/ui/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { forwardRef } from 'react';
import { Link as RouterLink, type LinkProps as RouterLinkProps } from 'react-router-dom';

const Link = forwardRef<HTMLAnchorElement, RouterLinkProps>(function Link(itemProps, ref) {
return <RouterLink ref={ref} {...itemProps} role={undefined} />;
return <RouterLink ref={ref} {...itemProps} />;
});

interface ListItemLinkProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { appBarHeight } from './theme';
export const StyledInteractableBoxFullHeight = styled(Box)(({ theme }) => ({
backgroundColor: theme.palette.mode === 'light' ? grey[100] : grey[800],
overflowY: 'auto',
height: `100dvh`,
height: '100dvh',
padding: theme.spacing(2),
paddingBottom: appBarHeight,
}));
2 changes: 1 addition & 1 deletion admin-redesign/src/app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const getCSVStringsAsFloats = (s: string) => {
};

// https://phuoc.ng/collection/clipboard/check-if-the-clipboard-api-is-supported/
export const isClipboardApiSupported = () => !!(navigator.clipboard && navigator.clipboard.writeText);
export const isClipboardApiSupported = () => !!navigator.clipboard?.writeText;

// https://philna.sh/blog/2017/03/14/the-web-share-api/
export const isWebShareApiSupported = () => !!('canShare' in navigator && navigator.share);
Expand Down
13 changes: 5 additions & 8 deletions admin-redesign/src/features/pollingPlaces/pollingPlaceHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export const getSausageChanceDescription = (pollingPlace: IPollingPlace) => {
return 'This booth has a MIXED chance of having food.';
case PollingPlaceChanceOfSausage.UNLIKELY:
return 'This booth is UNLIKELY to have food.';
case PollingPlaceChanceOfSausage.NO_IDEA:
case null:
default:
return 'We have never had reports from this booth.';
}
Expand All @@ -50,8 +48,6 @@ export const getSausageChanceDescriptionSubheader = (pollingPlace: IPollingPlace
case PollingPlaceChanceOfSausage.MIXED:
case PollingPlaceChanceOfSausage.UNLIKELY:
return 'Based on reports from past elections';
case PollingPlaceChanceOfSausage.NO_IDEA:
case null:
default:
return 'Let us know what you find!';
}
Expand Down Expand Up @@ -109,13 +105,14 @@ export const getPollingPlaceNomsDescriptiveText = (pollingPlace: IPollingPlace)

if (nomsList.length >= 3) {
return `${nomsList.slice(0, -1).join(', ')}, and ${nomsList.pop()}`;
} else if (nomsList.length === 2) {
}
if (nomsList.length === 2) {
return nomsList.join(' and ');
} else if (nomsList.length === 1) {
}
if (nomsList.length === 1) {
return nomsList[0];
} else {
return '';
}
return '';
};

export const getPollingPlaceDivisionsDescriptiveText = (pollingPlace: IPollingPlace) => {
Expand Down

0 comments on commit 46e68c4

Please sign in to comment.