Skip to content

Commit

Permalink
Merge pull request #99 from Linkup-3mw/dev
Browse files Browse the repository at this point in the history
Deploy
  • Loading branch information
moonyah authored Jun 11, 2024
2 parents fe058eb + c33fdf6 commit 527bbd2
Show file tree
Hide file tree
Showing 180 changed files with 23,462 additions and 2,739 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"react-dom": "^18",
"react-hook-form": "^7.51.4",
"react-responsive": "^10.0.0",
"react-spinners": "^0.13.8",
"recoil": "^0.7.7",
"swiper": "^11.1.3",
"tailwind-scrollbar-hide": "^1.1.7",
Expand Down
34 changes: 34 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

879 changes: 879 additions & 0 deletions public/svg/reservation/imageView/default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
879 changes: 879 additions & 0 deletions public/svg/reservation/imageView/enterprise.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
879 changes: 879 additions & 0 deletions public/svg/reservation/imageView/focusDesk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
879 changes: 879 additions & 0 deletions public/svg/reservation/imageView/mettingRoom4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
879 changes: 879 additions & 0 deletions public/svg/reservation/imageView/mettingRoom8.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
921 changes: 921 additions & 0 deletions public/svg/reservation/imageView/mobile/defaultMobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
350 changes: 350 additions & 0 deletions public/svg/reservation/imageView/mobile/enterpriseMobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
482 changes: 482 additions & 0 deletions public/svg/reservation/imageView/mobile/focusDeskMobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
252 changes: 252 additions & 0 deletions public/svg/reservation/imageView/mobile/mettingRoom4Mobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
180 changes: 180 additions & 0 deletions public/svg/reservation/imageView/mobile/mettingRoom8Mobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
609 changes: 609 additions & 0 deletions public/svg/reservation/imageView/mobile/monitorDeskMobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
429 changes: 429 additions & 0 deletions public/svg/reservation/imageView/mobile/oneRoomMobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
265 changes: 265 additions & 0 deletions public/svg/reservation/imageView/mobile/openDeskMobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
226 changes: 226 additions & 0 deletions public/svg/reservation/imageView/mobile/reservedMobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
144 changes: 144 additions & 0 deletions public/svg/reservation/imageView/mobile/seminarRoomMobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
219 changes: 219 additions & 0 deletions public/svg/reservation/imageView/mobile/studioMobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
879 changes: 879 additions & 0 deletions public/svg/reservation/imageView/monitorDeskMobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
879 changes: 879 additions & 0 deletions public/svg/reservation/imageView/oneRoom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
879 changes: 879 additions & 0 deletions public/svg/reservation/imageView/openDesk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
879 changes: 879 additions & 0 deletions public/svg/reservation/imageView/reserved.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
879 changes: 879 additions & 0 deletions public/svg/reservation/imageView/seminarRoom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
879 changes: 879 additions & 0 deletions public/svg/reservation/imageView/studioMobile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions public/svg/reservation/service/릴랙스룸.svg

This file was deleted.

10 changes: 0 additions & 10 deletions public/svg/reservation/service/맥주.svg

This file was deleted.

14 changes: 0 additions & 14 deletions public/svg/reservation/service/우편함.svg

This file was deleted.

8 changes: 0 additions & 8 deletions public/svg/reservation/service/폰부스.svg
Diff not rendered.
77 changes: 77 additions & 0 deletions src/api/club/searchClubs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import axios, { AxiosResponse } from 'axios';

interface Club {
id: number;
member_id: number;
member_name: string;
profile_image: string | null;
title: string;
introduction: string;
club_thumbnail: string | null;
club_type: string;
recruit_count: number;
club_members: any[] | null;
club_meetings: any[] | null;
}

interface SearchClubsResponse {
status_code: number;
message: string;
status: string;
data: {
content: Club[];
pageable: {
page_number: number;
page_size: number;
sort: {
sorted: boolean;
unsorted: boolean;
empty: boolean;
};
offset: number;
unpaged: boolean;
paged: boolean;
};
total_elements: number;
last: boolean;
total_pages: number;
first: boolean;
number_of_elements: number;
sort: {
sorted: boolean;
unsorted: boolean;
empty: boolean;
};
number: number;
size: number;
empty: boolean;
};
success: boolean;
}

const BASE_URL = 'https://api.linkup3mw.com/api/v1';

interface SearchClubsQuery {
location?: string;
category?: string[];
'no-coworker'?: boolean;
size?: number;
page?: number;
}

export async function searchClubs(
query: SearchClubsQuery,
): Promise<SearchClubsResponse> {
try {
const response: AxiosResponse<SearchClubsResponse> = await axios.get(
`${BASE_URL}/club/search`,
{
params: query,
},
);
return response.data;
} catch (error) {
console.error('Error searching clubs:', error);
throw error;
}
}
17 changes: 15 additions & 2 deletions src/app/(auth)/components/common/ButtonInInput.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
import { PulseLoader } from 'react-spinners';

interface Props {
text: string;
disabled?: boolean;
onClick: () => void;
isLoading?: boolean;
}
export default function ButtonInInput({ text, disabled, onClick }: Props) {
export default function ButtonInInput({
text,
disabled,
onClick,
isLoading,
}: Props) {
return (
<button
type="button"
disabled={disabled}
className="absolute right-[1.5rem] top-1/2 -translate-y-1/2 px-[0.72rem] min-w-[4.5rem] h-[2.125rem] bg-blue-400 disabled:bg-[#d0d0d8] rounded-[0.25rem] text-white disabled:text-main-black text-[0.875rem] font-bold max-md:right-[1rem] max-md:px-[0.5rem] max-md:min-w-[4.0625rem] max-md:h-[2.125rem] max-md:text-[0.875rem]"
className="overflow-hidden absolute right-[1.5rem] top-1/2 -translate-y-1/2 px-[0.72rem] min-w-[4.5rem] h-[2.125rem] bg-blue-400 disabled:bg-[#d0d0d8] rounded-[0.25rem] text-white disabled:text-main-black text-[0.875rem] font-bold max-md:right-[1rem] max-md:px-[0.5rem] max-md:min-w-[4.0625rem] max-md:h-[2.125rem] max-md:text-[0.875rem]"
onClick={onClick}
>
{text}
{isLoading && (
<div className="flex items-center justify-center absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-full h-full bg-[rgba(104,148,242,0.8)]">
<PulseLoader size={6} color="white" />
</div>
)}
</button>
);
}
9 changes: 6 additions & 3 deletions src/app/(auth)/components/signin/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useEffect, useState } from 'react';
import { useRouter } from 'next/navigation';
import Link from 'next/link';
import { signIn } from 'next-auth/react';
import debounce from 'lodash.debounce';
import { FieldValues, SubmitHandler, useForm } from 'react-hook-form';

import InputBox from '@common/components/form/InputBox';
Expand Down Expand Up @@ -58,6 +59,7 @@ export default function Login({ callbackUrl }: { callbackUrl: string }) {

if (res?.status === 200) {
router.push(callbackUrl);
window.location.reload();
}
if (res?.status === 401) {
setErrMsg((prev): ILoginErrMsg => {
Expand Down Expand Up @@ -107,22 +109,23 @@ export default function Login({ callbackUrl }: { callbackUrl: string }) {
/>
</InputBox>
<div>
<Link
{/* <Link
href="/"
className="inline-block -mt-[1.25rem] mb-[3.75rem] underline text-[0.875rem] font-bold leading-none text-[#8d8d9b]
max-md:mb-[2.5rem] max-md:-mt-[0.25rem] max-md:text-[0.75rem]
"
>
비밀번호를 잊으셨나요?
</Link>
</Link> */}
</div>
<LoginCheckbox register={register}>로그인 상태 유지</LoginCheckbox>
</div>
<div className="mt-[1.5rem] max-md:mt-[0.6rem]">
<BlueSquareBtn
name="로그인"
type="submit"
type="button"
disabled={!isDirty || !isValid}
onClick={debounce(handleSubmit(onSubmit), 1000)}
/>
</div>
</form>
Expand Down
6 changes: 6 additions & 0 deletions src/app/(auth)/components/signup/CompanyInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ export default function CompanyInput({
}: Props) {
const [isVerify, setIsVerify] = useState(false);
const [errMsg, setErrMsg] = useState('');
const [isLoading, setIsLoading] = useState(false);

const verifyCompanyFn = debounce(async () => {
const value = getValues('auth_code');
if (value.length == 0) return;

setIsLoading(true);

try {
const data = await verifyCompany(value);
if (data.status_code == 200) {
Expand All @@ -48,6 +51,8 @@ export default function CompanyInput({
setIsVerify(false);
setErrMsg('기업 전용 코드가 정확한지 확인해 주세요.');
console.log(e);
} finally {
setIsLoading(false);
}
}, 500);

Expand All @@ -72,6 +77,7 @@ export default function CompanyInput({
text={isVerify ? '인증완료' : '인증하기'}
onClick={verifyCompanyFn}
disabled={isVerify}
isLoading={isLoading}
/>
</span>
<input type="hidden" {...register('company_id')} />
Expand Down
1 change: 1 addition & 0 deletions src/app/(auth)/components/signup/EmailInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export default function EmailInput({
text={!isVerify ? '인증하기' : '인증완료'}
onClick={validateEmailFn}
disabled={error?.email !== undefined || isVerify}
isLoading={isLoading}
/>
</span>
{showVerify && (
Expand Down
15 changes: 13 additions & 2 deletions src/app/(auth)/components/signup/NicknameInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
UseFormClearErrors,
UseFormRegister,
UseFormSetError,
UseFormTrigger,
} from 'react-hook-form';
import Input from '@common/components/form/Input';
import InputBox from '@common/components/form/InputBox';
Expand All @@ -15,13 +16,15 @@ interface Props {
register: UseFormRegister<FieldValues>;
setError: UseFormSetError<FieldValues>;
clearErrors: UseFormClearErrors<FieldValues>;
trigger: UseFormTrigger<FieldValues>;
}

export default function NicknameInput({
error,
register,
setError,
clearErrors,
trigger,
}: Props) {
const [message, setMessage] = useState('');

Expand All @@ -32,11 +35,16 @@ export default function NicknameInput({
return;
}

if (username.length > 6) {
setMessage('');
return;
}

try {
const res = await validateNickname(username);
if (res.status_code === 200) {
setMessage('사용할 수 있는 닉네임입니다.');
clearErrors('username');
// clearErrors('username');
}
} catch (e: any) {
if (e.response.data.status_code === 400) {
Expand All @@ -52,7 +60,10 @@ export default function NicknameInput({

useEffect(() => {
register('username', {
onBlur: (e) => verifyNickname(e.target.value),
onBlur: (e) => {
trigger('username');
verifyNickname(e.target.value);
},
});
}, [verifyNickname]);

Expand Down
Loading

0 comments on commit 527bbd2

Please sign in to comment.