Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.0.9 #133

Merged
merged 3 commits into from
Aug 26, 2024
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
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vite.config.ts
jest.config.ts
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
"typescript": {
"alwaysTryTypes": true
}
},
"react": {
"version": "detect"
}
},
"rules": {
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@master

- name: Cache node modules
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -41,11 +41,14 @@ jobs:
- name: Install Dependencies
run: pnpm install --no-frozen-lockfile --force

- name: Lint Code
run: pnpm lint

- name: Build
run: CI='' pnpm run build

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
47 changes: 0 additions & 47 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,6 @@
<link rel="icon" type="image/svg+xml" href="/GDSC.svg" />
<link rel="apple-touch-icon" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GDSC_KNU_OFFICIAL</title>
<meta
name="description"
content="GDSC 경북대의 공식 홈페이지에 오신걸 환영합니다. GDSC 활동과 관련된 최신 정보와 이벤트 소식을 확인하세요."
/>

<!-- 오픈그래프 메타데이터 -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://gdsc-knu.com" />
<meta property="og:title" content="GDSC_KNU_OFFICIAL" />
<meta property="og:image" content="https://gdsc-knu.com/WhiteLogo.png" />
<meta
property="og:description"
content="GDSC 경북대의 공식 홈페이지에 오신걸 환영합니다. GDSC 활동과 관련된 최신 정보와 이벤트 소식을 확인하세요."
/>
<meta property="og:locale" content="ko_KR" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />

<!-- 트위터 카드 메타데이터 -->
<meta name="twitter:card" content="summary_large_image" />
<meta property="twitter:domain" content="gdsc-knu.com" />
<meta property="twitter:url" content="https://gdsc-knu.com" />
<meta name="twitter:title" content="GDSC_KNU_OFFICIAL" />
<meta
name="twitter:description"
content="GDSC 경북대의 공식 홈페이지에 오신걸 환영합니다. GDSC 활동과 관련된 최신 정보와 이벤트 소식을 확인하세요."
/>

<meta name="twitter:image" content="https://gdsc-knu.com/WhiteLogo.png" />

<!-- 구글 서치 어드바이저 -->
<meta
Expand All @@ -47,23 +17,6 @@
name="naver-site-verification"
content="591d63b39f14870ba53863f0f1ee27abdc89f5c2"
/>

<!-- Google tag (gtag.js) -->
<script type="text/javascript">
if (import.meta.env.VITE_ENV === 'production') {
(function() {
var gtagScript = document.createElement('script');
gtagScript.async = true;
gtagScript.src = 'https://www.googletagmanager.com/gtag/js?id=G-MLL2Z47LWL';
document.head.appendChild(gtagScript);

window.dataLayer = window.dataLayer || [];
function gtag(){ dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-MLL2Z47LWL');
})();
}
</script>
</head>
<body>
<div id="root"></div>
Expand Down
Binary file added public/ApplyInquiry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/CommingSoon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/apis/hooks/apply/ApplyInquiryAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ export const ApplyInquiryAPI = async (name: string, studentNumber: string) => {
if (typedError.code === 409) {
alert('최종지원된 서류는 확인하실 수 없습니다.');
throw new Error('최종지원된 서류는 확인하실 수 없습니다.');
} else if (typedError.code === 403) {
alert('본인이 아닌 지원자의 서류는 확인하실 수 없습니다.');
throw new Error('본인이 아닌 지원자의 서류는 확인하실 수 없습니다.');
} else {
alert('서버 오류가 발생했습니다. 잠시 후 다시 시도해주세요.');
throw new Error('서버 오류가 발생했습니다. 잠시 후 다시 시도해주세요.');
}
}
throw new Error('아직 서류를 제출하지 않으셨습니다.');
Expand Down
1 change: 0 additions & 1 deletion src/components/feature/auth/AuthModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Text from '@gdsc/components/common/typography/Text';
import { AuthBox } from '@gdsc/styles/AuthModalStyle';
import { displayCenter } from '@gdsc/styles/LayoutStyle';

// eslint-disable-next-line import/no-unresolved
import logo from '/GDSC.svg';
import styled from '@emotion/styled';

Expand Down
27 changes: 27 additions & 0 deletions src/hooks/useScrollTracker.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { useEffect } from 'react';

import { handleScroll } from '@gdsc/utils/anlytics';

// 유틸리티 함수 경로

const useScrollTracker = () => {
useEffect(() => {
const onScroll = () => {
const scrollPosition = window.scrollY;
const scrollHeight =
document.documentElement.scrollHeight - window.innerHeight;
const scrolledPercentage = (scrollPosition / scrollHeight) * 100;

if (scrolledPercentage >= 50) {
handleScroll();
}
};

window.addEventListener('scroll', onScroll);
return () => {
window.removeEventListener('scroll', onScroll);
};
}, []);
};

export default useScrollTracker;
72 changes: 37 additions & 35 deletions src/pages/CommingSoonPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,42 +33,44 @@ const CommingSoonPage = () => {
const isMobile = useMediaQuery({ query: '(max-width: 500px)' });

return (
<ErrorMessageWrapper>
<img src={Home} alt='home' />
<Text size='xxl' weight='bold' color='white'>
Comming Soon
</Text>
<Text size='xl' weight='bold' color='white'>
죄송합니다.
<br /> 현재 개발 중인 페이지입니다.
</Text>
<SubMessage>
<Text size='md' weight='normal' color='white'>
빠른 시일내에 <br />
사용자 분들께 더 좋은 서비스를 제공할 수 있도록 노력하겠습니다.
<br />
감사합니다.
<>
<ErrorMessageWrapper>
<img src={Home} alt='home' />
<Text size='xxl' weight='bold' color='white'>
Comming Soon
</Text>
</SubMessage>
{isMobile && (
<Link to='/'>
<CommonBtn
type='button'
width='256px'
height='47px'
mdWidth='256px'
mdHeight='47px'
mWidth='256px'
mHeight='47px'
color='blue'
hoverColor='blue'
backgroundColor='blue'
>
홈으로
</CommonBtn>
</Link>
)}
</ErrorMessageWrapper>
<Text size='xl' weight='bold' color='white'>
죄송합니다.
<br /> 현재 개발 중인 페이지입니다.
</Text>
<SubMessage>
<Text size='md' weight='normal' color='white'>
빠른 시일내에 <br />
사용자 분들께 더 좋은 서비스를 제공할 수 있도록 노력하겠습니다.
<br />
감사합니다.
</Text>
</SubMessage>
{isMobile && (
<Link to='/'>
<CommonBtn
type='button'
width='256px'
height='47px'
mdWidth='256px'
mdHeight='47px'
mWidth='256px'
mHeight='47px'
color='blue'
hoverColor='blue'
backgroundColor='blue'
>
홈으로
</CommonBtn>
</Link>
)}
</ErrorMessageWrapper>
</>
);
};

Expand Down
14 changes: 2 additions & 12 deletions src/pages/apply/ApplyExPage.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { useParams } from 'react-router-dom';

import ApplyEx from '@gdsc/pages/apply/components/ApplyEx';
import Star from '@gdsc/pages/main/components/Star';

import { SEO } from '@gdsc/utils/Seo';

import { DisplayLayout } from '@gdsc/styles/LayoutStyle';

import styled from '@emotion/styled';
import { ApplyExMetaData } from '@gdsc/router/components/MetaData';

const ApplyLayout = styled(DisplayLayout)`
height: 100%;
Expand All @@ -18,16 +15,9 @@ const ApplyLayout = styled(DisplayLayout)`
`;

const ApplyExPage = () => {
const { tech } = useParams();

return (
<>
<SEO
title='GDSC KNU - 지원서 작성'
description='GDSC KNU는 모든 경북대 학생들을 환영합니다.'
url={`https://gdsc-knu.com/${tech}`}
image='https://gdsc-knu.com/WhiteLogo.png'
/>
<ApplyExMetaData />
<ApplyLayout>
<ApplyEx />
{[...Array(25)].map((_, index) => (
Expand Down
15 changes: 3 additions & 12 deletions src/pages/apply/ApplyFormPage.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
import { useParams } from 'react-router-dom';

import ApplyForm from '@gdsc/pages/apply/components/ApplyForm';
import Star from '@gdsc/pages/main/components/Star';

import { SEO } from '@gdsc/utils/Seo';

import { DisplayLayout } from '@gdsc/styles/LayoutStyle';

const ApplyFormPage = () => {
const { tech } = useParams();
import { ApplyFormMetaData } from '@gdsc/router/components/MetaData';

const ApplyFormPage = () => {
return (
<>
<SEO
title='GDSC KNU - 지원서 작성'
description='GDSC KNU는 모든 경북대 학생들을 환영합니다.'
url={`https://gdsc-knu.com/${tech}/form`}
image='https://gdsc-knu.com/WhiteLogo.png'
/>
<ApplyFormMetaData />
<DisplayLayout>
<ApplyForm />
{[...Array(25)].map((_, index) => (
Expand Down
10 changes: 2 additions & 8 deletions src/pages/apply/ApplyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import ApplyNav from '@gdsc/pages/apply/components/ApplyNav';
import ApplyNavEnd from '@gdsc/pages/apply/components/ApplyNavEnd';
import Star from '@gdsc/pages/main/components/Star';

import { SEO } from '@gdsc/utils/Seo';

import { DisplayLayout } from '@gdsc/styles/LayoutStyle';

import styled from '@emotion/styled';
import { ApplyMetaData } from '@gdsc/router/components/MetaData';

const ApplyLayout = styled(DisplayLayout)`
height: 100%;
Expand All @@ -31,12 +30,7 @@ const ApplyPage = () => {

return (
<>
<SEO
title='GDSC KNU - 지원목록'
description='GDSC KNU는 모든 경북대 학생들을 환영합니다.'
url='https://gdsc-knu.com/apply'
image='https://gdsc-knu.com/ApplyNav.png'
/>
<ApplyMetaData />
<ApplyLayout>
{showForm ? <ApplyNav /> : <ApplyNavEnd />}
{[...Array(25)].map((_, index) => (
Expand Down
3 changes: 3 additions & 0 deletions src/pages/apply/components/ApplyForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
} from '@gdsc/pages/apply/components/ApplyFormDocs';

import { ApplyFormSchema } from '@gdsc/utils/ApplyFormScehma.util';
import { handleFormSubmit } from '@gdsc/utils/anlytics';

import { useApplyFormMutation } from '@gdsc/apis/hooks/apply/ApplyFormQuery';

Expand Down Expand Up @@ -141,10 +142,12 @@ const ApplyForm = () => {
})) || [],
};
if (submitType === 'submit') {
handleFormSubmit('Final Submit');
submitApplication(finalFormData);
// console.log(finalFormData);
} else if (submitType === 'save') {
// console.log(saveFormData);
handleFormSubmit('Save Submit');
submitApplication(saveFormData);
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/pages/apply/components/ApplySaveForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
} from '@gdsc/pages/apply/components/ApplyFormDocs';

import { ApplyFormSchema } from '@gdsc/utils/ApplyFormScehma.util';
import { handleFormSubmit } from '@gdsc/utils/anlytics';

import { useApplySaveMutation } from '@gdsc/apis/hooks/apply/ApplySaveQuery';

Expand All @@ -45,8 +46,8 @@ import {
import {
ApplyFormInterface,
ApplyFormQuestionInterface,
ApplyFormAPIInterface,
} from '@gdsc/types/ApplyInterface';
import { ApplyFormAPIInterface } from '@gdsc/types/ApplyInterface';
import { ErrorMessage } from '@hookform/error-message';
import { zodResolver } from '@hookform/resolvers/zod';

Expand Down Expand Up @@ -128,11 +129,13 @@ const ApplySaveForm = ({ SaveData }: ApplySaveFormProps) => {
})) || [],
};
if (submitType === 'submit') {
handleFormSubmit('Sub-Final Submit');
saveApplication(finalFormData);
// console.log(finalFormData);
} else if (submitType === 'save') {
// submitApplication(saveFormData);
// console.log(saveFormData);
handleFormSubmit('Sub-Save Submit');
saveApplication(saveFormData);
}
}
Expand Down
10 changes: 9 additions & 1 deletion src/pages/community/CommunityPage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import CommingSoonPage from '../CommingSoonPage';
import { CommunityMetaData } from '@gdsc/router/components/MetaData';

const CommunityPage = () => {
return <>커뮤니티 페이지</>;
return (
<>
<CommunityMetaData />
<CommingSoonPage />
</>
);
};

export default CommunityPage;
Loading