Skip to content

Commit

Permalink
Merge pull request #45 from GCVD-2024/develop
Browse files Browse the repository at this point in the history
[메인 머지] dev -> main 머지 진행
  • Loading branch information
imeureka authored Oct 17, 2024
2 parents 6288764 + db6d627 commit 4ba3afc
Show file tree
Hide file tree
Showing 28 changed files with 360 additions and 94 deletions.
8 changes: 6 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1.0,
user-scalable=0"
/>
<title>Digging Club</title>
</head>
<body>
Expand Down
6 changes: 3 additions & 3 deletions public/about/ConceptSavoring/concept-savoring-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions public/about/MainTitle/main_stars.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/constants/constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const NAVIGATION_ITEMS = [
{ name: 'ABOUT', path: '/' },
{ name: 'WORKS', path: 'work' },
{ name: 'GUEST', path: 'guest' },
{ name: 'WORKS', path: '/work' },
{ name: 'GUEST', path: '/guest' },
];

export const MOBILE_BREAKPOINT = 768;
Expand Down Expand Up @@ -49,3 +49,5 @@ export const WORDS = [

// CategoriesSection.tsx
export const CATEGORIES = ['ALL', 'UX', 'BRAND', 'GRAPHIC', 'ILLUST', 'MEDIA'] as const;
export const DETAIL_RESPONSE_CATEGORIES = ['ALL', 'UXUI', 'BX', 'GRAPHIC', 'ILLUSTRATION', 'MEDIA'] as const;
export const WORK_CATEGORIES = ['ALL', 'UX/UI', 'BRAND', 'GRAPHIC', 'ILLUST', 'MEDIA'] as const;
13 changes: 10 additions & 3 deletions src/hooks/queries/useGetWorkList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,21 @@ const getWorkList = async (category: string, currentPage: number) => {
const res = await get<WorkListResponseType>(
`work?category=${mappedCategory}&currentPage=${currentPage}`
);
console.log('API Response:', res);
return res.result.works as WorkListType[];
};

export const useGetWorkList = ({ category, currentPage }: WorkListRequestType) => {
let mappedCategory = (() => {
switch (category) {
case 'UX/UI':
return 'UX';
default:
return category;
}
})();
const { data, hasNextPage, fetchNextPage, isFetchingNextPage } = useInfiniteQuery({
queryKey: WORK_KEYS.list(category, currentPage),
queryFn: ({ pageParam = currentPage }) => getWorkList(category, pageParam),
queryKey: WORK_KEYS.list(mappedCategory, currentPage),
queryFn: ({ pageParam = currentPage }) => getWorkList(mappedCategory, pageParam),
getNextPageParam: (lastPage, allPages) => {
if (lastPage && Array.isArray(lastPage) && lastPage?.length === 10) {
return allPages?.length ? allPages.length + 1 : 1;
Expand Down
1 change: 1 addition & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import ReactDOM from 'react-dom/client';
import './index.css';
import { RouterProvider } from 'react-router-dom';
import router from './routes/Router';
import './../public/fonts/font.css';

ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
Expand Down
3 changes: 1 addition & 2 deletions src/pages/About/About.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Helmet } from 'react-helmet-async';
import styled from 'styled-components';
import MainTitle from './components/MainTitle/MainTitle';
import ExhibitionInfo from './components/ExhibitionInfo/ExhibitionInfo';
import ExhibitionIntroduction from './components/ExhibitionIntroduction/ExhibitionIntroduction';
import ExhibitionMeaning from './components/ExhibitionMeaning/ExhibitionMeaning';
import GraduationCommittee from './components/GraduationCommittee/GraduationCommittee';
Expand Down Expand Up @@ -32,7 +31,7 @@ function About() {
/>
{isMobile ? <></> : <ScrollIndicator scrollPercentage={scrollPercentage} />}
<MainTitle />
<ExhibitionInfo />
{/* <ExhibitionInfo /> */}
<ExhibitionIntroduction />
<ExhibitionMeaning />
<GraduationCommittee />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,20 @@ const MatterJsContainer = styled.div<{ isMobile: boolean }>`
const ContentWrapper = styled.div<{ isMobile: boolean }>`
display: flex;
flex-direction: ${(props) => (props.isMobile ? 'column' : 'row')};
gap: ${(props) => (props.isMobile ? '30px' : '300px')};
align-items: ${(props) => (props.isMobile ? 'center' : 'flex-start')};
gap: ${(props) => (props.isMobile ? '30px' : '250px')};
align-items: flex-start;
`;

const Title = styled.h1<{ isMobile: boolean }>`
font-size: ${(props) => (props.isMobile ? '32px' : '40px')};
font-weight: 800;
text-align: ${(props) => (props.isMobile ? 'center' : 'left')};
text-align: left;
line-height: 140%;
`;

const Description = styled.p<{ isMobile: boolean }>`
font-size: ${(props) => (props.isMobile ? '14px' : '16px')};
font-size: ${(props) => (props.isMobile ? '12px' : '16px')};
font-weight: 500;
line-height: 150%;
text-align: ${(props) => (props.isMobile ? 'center' : 'left')};
line-height: 140%;
text-align: left;
`;
Loading

0 comments on commit 4ba3afc

Please sign in to comment.