Skip to content

Commit

Permalink
Merge pull request #168 from COW-dev/fix/#163
Browse files Browse the repository at this point in the history
  • Loading branch information
yougyung authored Sep 12, 2024
2 parents 54225bb + d8c6d2a commit 38a03d4
Show file tree
Hide file tree
Showing 36 changed files with 349 additions and 299 deletions.
4 changes: 2 additions & 2 deletions src/apis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,12 @@ export async function deleteClub({ clubId, token }: DeleteClub) {
});
}
export async function deleteFixComment({
fixZonId,
fixZoneId,
commentId,
token,
}: DeleteFixComment) {
return await api.delete(
`/admin/fix-zones/${fixZonId}/comments/${commentId}`,
`/admin/fix-zones/${fixZoneId}/comments/${commentId}`,
{
headers: {
Authorization: 'Bearer ' + token,
Expand Down
14 changes: 14 additions & 0 deletions src/assets/bin-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
50 changes: 0 additions & 50 deletions src/components/common/Dropdown.tsx

This file was deleted.

10 changes: 5 additions & 5 deletions src/components/common/ExelDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function ExcelDropdown() {
id="dropdownHoverButton"
data-dropdown-toggle="dropdownHover"
data-dropdown-trigger="hover"
className="md:text-md inline-flex min-w-fit items-center rounded-lg bg-green-100 px-5 py-2.5 text-center text-sm font-bold text-green-500 hover:bg-green-200 focus:outline-none "
className="inline-flex w-20 items-center justify-center rounded-lg bg-green-100 py-2.5 text-center text-sm font-bold text-green-500 hover:bg-green-200 focus:outline-none md:w-32"
type="button"
onClick={handleClickExcel}
>
Expand All @@ -56,21 +56,21 @@ export default function ExcelDropdown() {
{isOpenMoal && (
<div
id="dropdownHover"
className="relative z-20 m-auto min-w-fit divide-y divide-gray-100 rounded-lg bg-green-200 shadow "
className="relative z-20 m-auto min-w-fit divide-y divide-gray-100 rounded-lg bg-green-200 shadow"
>
<ul
className="absolute -right-18 z-10 mt-2 w-44 rounded-xl border-[1px] bg-white py-2 text-sm text-gray-700 shadow-lg"
className="absolute right-0 z-10 mt-2 w-32 rounded-xl border-[1px] bg-white py-2 text-sm text-gray-700 shadow-lg"
aria-labelledby="dropdownHoverButton"
>
<li
onClick={handleClickDownload}
className="block cursor-pointer px-4 py-2 font-semibold hover:bg-gray-100"
className="block cursor-pointer px-3 py-2 font-semibold hover:bg-gray-100"
>
동아리원 다운받기
</li>
<li
onClick={openModal}
className="block cursor-pointer px-4 py-2 font-semibold hover:bg-gray-100"
className="block cursor-pointer px-3 py-2 font-semibold hover:bg-gray-100"
>
동아리원 업로드
</li>
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Heading.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
type HeadingProps = {
children: string;
children: React.ReactNode;
};

export default function Heading({ children }: HeadingProps) {
Expand Down
6 changes: 4 additions & 2 deletions src/components/common/UploadImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type UploadImageProps = {
| Dispatch<SetStateAction<ClubDetail>>;
urlsName?: string;
setRemoveFile?: Dispatch<SetStateAction<boolean>>;
id?: number;
};

export default function UploadImage({
Expand All @@ -23,6 +24,7 @@ export default function UploadImage({
imageUrls,
setNoticeData,
setRemoveFile,
id,
}: UploadImageProps) {
const [previewImageUrl, setPreviewImageUrl] = useState<string>('');
useEffect(() => {
Expand Down Expand Up @@ -80,7 +82,7 @@ export default function UploadImage({
</>
) : (
<label
htmlFor="dropzone-file"
htmlFor={`dropzone-file-${id}`}
className=" dar flex h-64 w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-none border-gray-300 bg-gray-50 hover:bg-gray-100"
>
<div className="flex flex-col items-center justify-center pb-6 pt-5 text-gray-400">
Expand All @@ -91,7 +93,7 @@ export default function UploadImage({
</p>
</div>
<input
id="dropzone-file"
id={`dropzone-file-${id}`}
type="file"
className="hidden"
accept="image/*"
Expand Down
6 changes: 3 additions & 3 deletions src/components/documents/DocumentList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from 'react';
import Image from 'next/image';
import { useCookies } from 'react-cookie';
import Bin from '@/assets/bin.svg';
import Bin from '@/assets/bin-red.svg';
import Download from '@/assets/download.svg';
import { ROLE_TYPE } from '@/constants/text';
import { useAllDocuments } from '@/hooks/api/document/useAllDocuments';
Expand Down Expand Up @@ -75,7 +75,7 @@ export default function DocumentList() {
}`}
>
<Image
className=" mb-1 h-5 w-5 cursor-pointer hover:opacity-50 md:h-6 md:w-6 "
className="mb-1 h-5 w-5 cursor-pointer hover:opacity-50 md:h-6 md:w-6 "
src={Download}
alt={'다운로드 이미지'}
width={24}
Expand All @@ -84,7 +84,7 @@ export default function DocumentList() {
/>
{role === ROLE_TYPE.ROLE_ADMIN && (
<Image
className=" h-5 w-5 cursor-pointer hover:opacity-50 md:h-6 md:w-6"
className="h-5 w-5 cursor-pointer hover:opacity-50 md:h-6 md:w-6"
src={Bin}
alt={'휴지통 이미지'}
width={24}
Expand Down
2 changes: 1 addition & 1 deletion src/components/fix/FixAdminList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCookies } from 'react-cookie';
import { useAllFix } from '@/hooks/api/fixzone/useAllFix';
import { sortFixZone } from '@/utils/sort';
import { sortFixZone } from '@/utils/change';
import FixItem from './FixItem';

export default function FixAdminList() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/fix/FixClubList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCookies } from 'react-cookie';
import { useMyFix } from '@/hooks/api/fixzone/useMyFix';
import { sortFixZone } from '@/utils/sort';
import { sortFixZone } from '@/utils/change';
import FixItem from './FixItem';

export default function FixClubList() {
Expand Down
Loading

0 comments on commit 38a03d4

Please sign in to comment.