Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ function App() {
<Route path="finish" element={<FinishStep />} />
</Route>
</Route>
<Route element={<Layout />}>
<Route path="legal">
<Route path="oss" element={<LicensePage />} />
<Route path="terms" element={<TermsPage />} />
<Route path="privacy" element={<PrivacyPolicyPage />} />
<Route path="marketing" element={<MarketingPolicyPage />} />
</Route>
</Route>
</Route>

<Route element={<ProtectedRoute />}>
Expand All @@ -61,12 +69,6 @@ function App() {
</Route>
<Route element={<Layout />}>
<Route path="profile" element={<Profile />} />
<Route path="legal">
<Route path="oss" element={<LicensePage />} />
<Route path="terms" element={<TermsPage />} />
<Route path="privacy" element={<PrivacyPolicyPage />} />
<Route path="marketing" element={<MarketingPolicyPage />} />
</Route>
<Route path="clubs">
<Route index element={<ClubList />} />
<Route path="search" element={<ClubSearch />} />
Expand Down
6 changes: 3 additions & 3 deletions src/components/layout/Header/components/InfoHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ function InfoHeader() {

return (
<header className="fixed top-0 right-0 left-0 flex items-center bg-white px-3 py-2">
<div className="flex flex-1 flex-col gap-1">
<div className="text-sm leading-4 font-semibold text-indigo-700">{myInfo.universityName}</div>
<div className="text-[10px] leading-3 text-indigo-300">
<div className="flex flex-1 flex-col">
<div className="text-h3 text-indigo-700">{myInfo.universityName}</div>
<div className="text-cap1 text-indigo-300">
{myInfo.name} {myInfo.studentNumber}
</div>
</div>
Expand Down
10 changes: 8 additions & 2 deletions src/components/layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import { Suspense } from 'react';
import { Outlet } from 'react-router-dom';
import { Outlet, useLocation } from 'react-router-dom';
import { twMerge } from 'tailwind-merge';
import BottomNav from './BottomNav';
import Header from './Header';
import { HEADER_CONFIGS } from './Header/headerConfig';

interface LayoutProps {
showBottomNav?: boolean;
contentClassName?: string;
}

export default function Layout({ showBottomNav = false, contentClassName }: LayoutProps) {
const { pathname } = useLocation();
const headerConfig = HEADER_CONFIGS.find((config) => config.match(pathname));
const isInfoHeader = headerConfig?.type === 'info';

return (
<div
className="fixed inset-0 flex flex-col overflow-hidden"
Expand All @@ -19,7 +24,8 @@ export default function Layout({ showBottomNav = false, contentClassName }: Layo
<Suspense>
<main
className={twMerge(
'bg-background box-border flex min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain pt-11',
'bg-background box-border flex min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain',
isInfoHeader ? 'pt-15' : 'pt-11',
showBottomNav && 'pb-19',
contentClassName
)}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Auth/Login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function Login() {
<div className="flex flex-1 flex-col justify-between p-8 pb-23">
<div>
<div className="text-2xl font-extrabold whitespace-pre-wrap">모든 동아리를{'\n'}하나로 연결하다</div>
<div className="text-3xl font-black">KONECT</div>
<div className="text-4xl font-black">KONECT</div>
</div>
<div className="flex flex-col items-center gap-4">
<span className="text-sm text-gray-500">소셜 계정으로 로그인</span>
Expand Down
14 changes: 7 additions & 7 deletions src/pages/Auth/SignUp/ConfirmStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,36 @@ function ConfirmStep() {
return (
<StepLayout
title="정보를 확인해주세요"
description={`다시 한번 정보를 확인해주세요\n제공된 정보가 부정확할 경우 불이익이 발생할 수 있습니다`}
description={`다시 한번 정보를 확인해주세요\n정보가 부정확할 경우 불이익이 발생할 수 있습니다`}
onNext={handleNext}
nextDisabled={isPending}
>
<div className="text-sm font-medium text-red-500">반드시 정확한 값을 입력해주세요</div>
<div className="flex flex-col gap-1">
<label className="text-[15px] leading-6 font-medium text-indigo-300">학교명</label>
<label className="text-sub2 text-indigo-300">학교명</label>
<input
type="text"
value={universityName}
disabled
className="bg-indigo-5 rounded-lg p-2 text-[15px] leading-6 font-semibold disabled:text-indigo-200"
className="bg-indigo-5 text-sub1 rounded-lg p-2 disabled:text-indigo-200"
/>
</div>
<div className="flex flex-col gap-1">
<label className="text-[15px] leading-6 font-medium text-indigo-300">학번</label>
<label className="text-sub2 text-indigo-300">학번</label>
<input
type="text"
value={studentId}
disabled
className="bg-indigo-5 rounded-lg p-2 text-[15px] leading-6 font-semibold disabled:text-indigo-200"
className="bg-indigo-5 text-sub1 rounded-lg p-2 disabled:text-indigo-200"
/>
</div>
<div className="flex flex-col gap-1">
<label className="text-[15px] leading-6 font-medium text-indigo-300">이름</label>
<label className="text-sub2 text-indigo-300">이름</label>
<input
type="text"
value={name}
disabled
className="bg-indigo-5 rounded-lg p-2 text-[15px] leading-6 font-semibold disabled:text-indigo-200"
className="bg-indigo-5 text-sub1 rounded-lg p-2 disabled:text-indigo-200"
/>
</div>
{error && (
Expand Down
6 changes: 3 additions & 3 deletions src/pages/Auth/SignUp/FinishStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ function FinishStep() {
<div className="flex flex-col items-center text-center">
<CheckInCircleIcon className="mt-15" />

<div className="mt-8 text-2xl font-extrabold">환영합니다!</div>
<div className="text-d2 mt-8">환영합니다!</div>

<div>
<div className="font-extrabold">{myInfo.name}님</div>
<div className="mt-1 text-xs text-indigo-300">
<div className="text-h1 my-3">{myInfo.name}님</div>
<div className="text-h5 text-indigo-300">
<div>KONECT 가입이 완료되었습니다.</div>
<div>동아리 활동을 시작해보세요!</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Auth/SignUp/NameStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function NameStep() {
const value = e.target.value.replace(/[^a-zA-Z가-힣ㆍᆞᆢㄱ-ㅎㅏ-ㅣ\s]/g, '');
setName(value);
}}
className="mt-5 w-full border-b-2 border-indigo-400 py-4 text-[20px] font-bold text-indigo-300"
className="text-h3 mt-5 w-full border-b-2 border-indigo-400 py-4 text-indigo-300"
/>
</StepLayout>
);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Auth/SignUp/StudentIdStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function StudentIdStep() {
const value = e.target.value.replace(/[^0-9]/g, '');
setStudentId(value);
}}
className="mt-5 w-full border-b-2 border-indigo-400 py-4 text-[20px] font-bold text-indigo-300"
className="text-h3 mt-5 w-full border-b-2 border-indigo-400 py-4 text-indigo-300"
/>
</StepLayout>
);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Auth/SignUp/TermStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function TermStep() {
return (
<div className="flex flex-1 flex-col justify-between px-8 py-5" style={{ marginBottom: 'calc(32px + var(--sab))' }}>
<div className="flex flex-col gap-2 text-center">
<div className="text-[28px] font-extrabold">서비스 이용 동의</div>
<div className="text-d2">서비스 이용 동의</div>
<div className="font-semibold text-indigo-300">원활한 서비스 이용을 위해 동의해주세요</div>

<div className="mt-10 flex w-full flex-col gap-3">
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Auth/SignUp/UniversityStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useGetUniversityList } from './hooks/useUniversity';
function UniversityCard({ label, onClick }: { label: string; onClick: () => void }) {
return (
<Card onClick={onClick} className="border-indigo-75 flex w-full flex-row items-center justify-between">
<div>{label}</div>
<div className="text-sub2">{label}</div>
<RightArrowIcon />
</Card>
);
Expand Down Expand Up @@ -40,7 +40,7 @@ function UniversityStep() {
value={universityName}
placeholder="학교를 입력해주세요.."
onChange={(e) => setUniversityName(e.target.value)}
className="mt-5 w-full border-b-2 border-indigo-400 py-4 text-[20px] font-bold text-indigo-300 placeholder:text-indigo-300"
className="text-h3 mt-5 w-full border-b-2 border-indigo-400 py-4 text-indigo-300 placeholder:text-indigo-300"
/>
<div className="mt-7 flex flex-col gap-2">
{filteredUniversities.map((university) => (
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Auth/SignUp/components/AgreementArrow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function AgreementRow({ checked, onChange, label, route, RightIcon, CheckIcon }:
onChange={(e) => onChange(e.target.checked)}
/>
<CheckIcon className="text-indigo-100 peer-checked:text-black" />
<span className="text-sm font-medium text-indigo-100 peer-checked:text-black">{label}</span>
<span className="text-sub2 text-indigo-100 peer-checked:text-black">{label}</span>
</label>

{RightIcon ? (
Expand All @@ -45,7 +45,7 @@ function AgreementAllRow({ checked, onChange, label, BigCheckIcon }: AgreementAl
<label className="flex cursor-pointer items-center gap-3">
<input type="checkbox" className="peer sr-only" checked={checked} onChange={(e) => onChange(e.target.checked)} />
<BigCheckIcon className="text-indigo-100 peer-checked:text-black" />
<span className="font-semibold text-indigo-100 peer-checked:text-black">{label}</span>
<span className="text-h3 text-indigo-100 peer-checked:text-black">{label}</span>
</label>
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Auth/SignUp/components/StepLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function StepLayout({
return (
<div className="flex flex-1 flex-col justify-between px-8 py-5" style={{ marginBottom: 'calc(32px + var(--sab))' }}>
<div className="flex flex-col gap-2">
<div className="text-[28px] font-extrabold">{title}</div>
<div className="text-body-4-m whitespace-pre-line text-indigo-300">{description}</div>
<div className="text-d2">{title}</div>
<div className="text-sm leading-5 font-medium whitespace-pre-line text-indigo-300">{description}</div>
{children}
</div>

Expand Down
2 changes: 2 additions & 0 deletions src/pages/Chat/ChatRoom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ function ChatRoom() {
sendMessage({ chatRoomId: Number(chatRoomId), content: message });
textareaRef.current.value = '';
textareaRef.current.style.height = 'auto';
textareaRef.current.focus();
messagesEndRef.current?.scrollIntoView();
}
}
};
Expand Down
12 changes: 6 additions & 6 deletions src/pages/Club/ClubDetail/components/ClubIntro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ function ClubIntro({ clubDetail }: ClubIntroProps) {
return (
<>
<Card>
<div className="text-sm leading-4 font-bold text-indigo-700">동아리 소개</div>
<div className="mt-1.5 text-xs leading-3.5 text-indigo-300">{clubDetail.introduce}</div>
<div className="text-h3 text-indigo-700">동아리 소개</div>
<div className="text-sub2 mt-1.5 text-indigo-300">{clubDetail.introduce}</div>
</Card>
<Card>
<div className="text-sm leading-4 font-bold text-indigo-700">위치 및 회원 수</div>
Expand Down Expand Up @@ -54,13 +54,13 @@ function ClubIntro({ clubDetail }: ClubIntroProps) {
</div>
</Card>
<Card>
<div className="flex flex-col items-center gap-1 text-indigo-300">
<div className="text-xs leading-3.5 font-medium">동아리에 대해 궁금한 점이 있으신가요?</div>
<div className="text-[10px] leading-3">편하게 문의해주세요!</div>
<div className="text-body3 flex flex-col items-center gap-1 text-indigo-300">
<div>동아리에 대해 궁금한 점이 있으신가요?</div>
<div>편하게 문의해주세요!</div>
</div>
<button
onClick={handleInquireClick}
className="bg-indigo-5 flex items-center justify-center gap-1 rounded-sm py-3 text-sm leading-3.5 font-medium"
className="bg-indigo-5 text-body3 flex items-center justify-center gap-1 rounded-sm py-3"
>
<PaperPlaneIcon />
문의하기
Expand Down
5 changes: 4 additions & 1 deletion src/pages/Club/ClubDetail/components/ClubRecruitment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ function ClubRecruitment({ clubId }: ClubRecruitProps) {
<div>
<div className="text-sm leading-4 font-bold text-indigo-700">신입 회원 모집</div>
<div className="mt-1.5 text-xs leading-3.5 text-indigo-300">
모집 기간 : {clubRecruitment.startDate} ~ {clubRecruitment.endDate}
모집 기간 :{' '}
{clubRecruitment.startDate && clubRecruitment.endDate
? `${clubRecruitment.startDate} ~ ${clubRecruitment.endDate}`
: '상세 모집'}
</div>
</div>
{canApply ? (
Expand Down
10 changes: 5 additions & 5 deletions src/pages/Club/ClubDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ function ClubDetail() {
<div className="fixed right-0 left-0 bg-white shadow-[0_1px_2px_0_rgba(0,0,0,0.04)]">
<div className="flex items-start gap-4 p-4">
<img
className="border-indigo-5 h-16 w-16 rounded-sm border"
className="border-indigo-5 h-17.5 w-17.5 rounded-sm border"
src={clubDetail.imageUrl}
alt={clubDetail.name}
/>
<div>
<div className="mb-1 text-xl leading-5.5 font-black">{clubDetail.name}</div>
<div className="mb-1 text-[10px] leading-3">{clubDetail.categoryName}</div>
<div className="text-sm leading-3.5">{clubDetail.description}</div>
<div className="flex min-w-0 flex-col gap-1">
<div className="text-xl leading-5.5 font-black">{clubDetail.name}</div>
<div className="text-body3">{clubDetail.categoryName}</div>
<div className="text-sub2 truncate">{clubDetail.description}</div>
</div>
</div>
<div className="flex items-center gap-3 bg-white px-3">
Expand Down
12 changes: 6 additions & 6 deletions src/pages/Club/ClubList/components/ClubCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ interface ClubCardProps {
function ClubCard({ club }: ClubCardProps) {
return (
<Link
to={`/clubs/${club.id}`}
to={`/clubs/${club.id}${club.status === 'ONGOING' ? '?tab=recruitment' : ''}`}
className="border-indigo-5 flex w-full items-start gap-3 rounded-lg border bg-white p-3"
>
<img src={club.imageUrl} className="border-indigo-5 h-13 w-13 rounded-sm border" alt={club.name} />
<div className="min-w-0 flex-1">
<div className="flex items-center justify-between">
<div className="flex items-center gap-1">
<div className="text-[17px] leading-5 font-bold text-indigo-700">{club.name}</div>
<div className="text-[11px] leading-3 text-indigo-300">{club.categoryName}</div>
<div className="text-h3 text-indigo-700">{club.name}</div>
<div className="text-cap1 text-indigo-300">{club.categoryName}</div>
</div>
{club.status === 'ONGOING' && (
<div className="flex items-center rounded-sm bg-[#3182f6] px-1 py-0.5 text-center text-[10px] leading-3 font-semibold text-white">
<div className="text-cap2 flex items-center rounded-sm bg-[#3182f6] px-1 py-0.5 text-center text-white">
모집중
</div>
)}
</div>
<div className="mt-0.5 truncate text-[13px] leading-4 text-indigo-300">{club.description}</div>
<div className="text-sub2 mt-0.5 truncate text-indigo-300">{club.description}</div>
<div className="mt-1 flex gap-1">
{club.tags.map((tag) => (
<div
key={tag}
className="bg-indigo-5 xs:text-[11px] flex items-center rounded-sm px-1.5 py-[3px] text-[9px] text-indigo-300"
className="bg-indigo-5 text-body3 flex items-center rounded-sm px-1.5 py-[3px] text-indigo-300"
>
#{tag}
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/pages/Club/ClubList/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ interface SearchBarProps {
value?: string;
onChange?: (value: string) => void;
onSubmit?: (e: FormEvent<HTMLFormElement>) => void;
autoFocus?: boolean;
}

function SearchBar({ isButton, value, onChange, onSubmit }: SearchBarProps) {
function SearchBar({ isButton, value, onChange, onSubmit, autoFocus }: SearchBarProps) {
const wrapperClass = 'fixed left-0 right-0 bg-white px-3 py-2 shadow-[0_2px_2px_0_rgba(0,0,0,0.04)] z-10';

const content = (
Expand All @@ -21,6 +22,7 @@ function SearchBar({ isButton, value, onChange, onSubmit }: SearchBarProps) {
readOnly={isButton && !onChange}
value={value}
onChange={onChange ? (e) => onChange(e.target.value) : undefined}
autoFocus={autoFocus}
/>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Club/ClubList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ function ClubList() {
<div className="pb-15">
<SearchBar isButton />
<div className="bg-background mt-13 flex flex-col gap-2 px-3 pt-2 pb-4">
<div className="text-[10px] leading-4 text-indigo-300">
총 <span className="font-bold text-black">{totalCount}개</span>의 동아리
<div className="text-sub2 text-indigo-300">
총 <span className="text-black">{totalCount}개</span>의 동아리
</div>

<div className="flex flex-col gap-2">
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Club/ClubSearch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ function ClubSearch() {

return (
<>
<SearchBar value={keyword} onChange={setKeyword} onSubmit={handleSubmit} />
<SearchBar value={keyword} onChange={setKeyword} onSubmit={handleSubmit} autoFocus />

<div className="mt-13 flex flex-col gap-2 px-3 pt-2 pb-4">
{!submittedQuery ? (
<div className="py-6 text-center text-xs text-indigo-300">검색어를 입력해서 동아리를 검색해보세요.</div>
) : (
<>
<div className="text-[10px] leading-4 text-indigo-300">
<div className="text-cap2 text-indigo-300">
총 <span className="font-bold text-black">{totalCount}개</span>의 동아리
</div>

Expand Down
8 changes: 4 additions & 4 deletions src/pages/Home/components/SimpleClubCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ function SimpleClubCard({ club }: SimpleClubCardProps) {
<div className="min-w-0 flex-1">
<div className="flex items-center justify-between">
<div className="flex items-center gap-1">
<div className="leading-4.5 font-bold text-indigo-700">{club.name}</div>
<div className="text-h3 text-indigo-700">{club.name}</div>
{club.position !== '일반 회원' && (
<div className="text-indigo-0 flex items-center rounded-sm bg-[#3182F6] px-1 py-0.5 text-[10px] leading-3">
<div className="text-indigo-0 text-cap2-strong flex items-center rounded-sm bg-[#3182F6] px-1 py-0.5">
운영진
</div>
)}
</div>
{!club.isFeePaid && (
<div className="flex items-center rounded-full bg-[#FFE5E5E5] px-3 py-1.5 text-[10px] leading-3 font-semibold text-[#FF4E4E]">
<div className="text-cap2 flex items-center rounded-full bg-[#FFE5E5E5] px-3 py-1.5 font-semibold text-[#FF4E4E]">
<WarningIcon />
납부할 회비가 있어요
</div>
)}
</div>
<div className="mt-1 text-[11px] leading-3 text-indigo-300">
<div className="text-sub2 mt-1 text-indigo-300">
{club.position}·{club.categoryName}
</div>
</div>
Expand Down
Loading