Skip to content

Commit

Permalink
Fix Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
SurabhiKeesara committed Nov 9, 2023
1 parent 86fddd6 commit d3b407c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/api/protectedApiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ export interface ProtectedApiClient {
) => Promise<void>;
readonly addSites: (request: AddSitesRequest) => Promise<void>;
readonly sendEmail: (request: SendEmailRequest) => Promise<void>;
readonly deleteImage: (
imageId: number,
) => Promise<void>;
readonly deleteImage: (imageId: number) => Promise<void>;
readonly filterSites: (
params: FilterSitesParams,
) => Promise<FilterSitesResponse>;
Expand Down Expand Up @@ -201,7 +199,7 @@ export const ParameterizedApiRoutes = {
NAME_SITE_ENTRY: (siteId: number): string =>
`${baseSiteRoute}${siteId}/name_entry`,
DELETE_IMAGE: (imageId: number): string =>
`${baseSiteRoute}site_image/${imageId}`,
`${baseSiteRoute}site_image/${imageId}`,
};

export const ParameterizedAdminApiRoutes = {
Expand Down
16 changes: 10 additions & 6 deletions src/components/treePage/siteImageCarousel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import {Button, Carousel, message, Modal, Space} from 'antd';
import { Button, Carousel, message, Modal, Space } from 'antd';
import LeftOutlined from '@ant-design/icons/lib/icons/LeftOutlined';
import RightOutlined from '@ant-design/icons/lib/icons/RightOutlined';
import { useSelector } from 'react-redux';
Expand All @@ -15,8 +15,7 @@ import { ConfirmDelete } from '../careEntry';
// import {GreenButton, StyledClose} from '../themedComponents';
import { LinkButton } from '../linkButton';
import { LIGHT_GREY, LIGHT_RED, WHITE } from '../../utils/colors';
import protectedApiClient from "../../api/protectedApiClient";
import {getSiteData} from "../../containers/treePage/ducks/thunks";
import protectedApiClient from '../../api/protectedApiClient';

const CarouselContainer = styled.div`
margin-top: 20px;
Expand Down Expand Up @@ -70,8 +69,6 @@ export const DeleteSiteImageButton = styled(LinkButton)`
}
`;



export const SiteImageCarousel: React.FC = () => {
const { t } = useTranslation(n(site, 'treePage'), { nsMode: 'fallback' });

Expand Down Expand Up @@ -143,7 +140,14 @@ export const SiteImageCarousel: React.FC = () => {
>
<p>Are you sure you want to delete this image?</p>
<ConfirmDelete
onClick={() => onClickDeleteImage(latestEntrySiteImages[currSlideIndex].imageId)}>Delete</ConfirmDelete>
onClick={() =>
onClickDeleteImage(
latestEntrySiteImages[currSlideIndex].imageId,
)
}
>
Delete
</ConfirmDelete>
</Modal>
</CarouselContainer>
)}
Expand Down

0 comments on commit d3b407c

Please sign in to comment.