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

[Feature] Landing page #37

Merged
merged 24 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4b06594
refactor: 헤더 로그인 로직 분리
cobocho Jul 13, 2024
96a7b35
feat: 랜딩 레이아웃 구현
cobocho Jul 13, 2024
597879b
feat: 아이콘 컴포넌트 제작
hin6150 Jul 13, 2024
293fa37
feat: 히어로 랜딩 구현
cobocho Jul 13, 2024
3d06f4e
Merge branch 'landing-page' of https://github.com/makevook/vook-clien…
cobocho Jul 13, 2024
2e1d085
refactor: 컴포넌트 구조 변경
hin6150 Jul 13, 2024
f80a7cc
feat: 카드 컴포넌트 개발
hin6150 Jul 13, 2024
12f3ae5
feat: 아이콘 섹션 일부 구현
cobocho Jul 13, 2024
6d51f54
fixt: 머지
cobocho Jul 13, 2024
2dd0419
feat: 랜딩페이지 - 상세설명 레이아웃 섹션 구현
hin6150 Jul 13, 2024
f126f85
feat: 랜딩페이지 하단 UI 레이아웃 구현
hin6150 Jul 14, 2024
f0387f4
feat: 애니메이션 적용
hin6150 Jul 14, 2024
b8267e8
feat: 랜딩 페이지 아이콘 섹션 일부 구현
cobocho Jul 16, 2024
214a673
Merge branch 'landing-page' of https://github.com/makevook/vook-clien…
cobocho Jul 16, 2024
dbde106
design: 아이콘 섹션 별 추가
cobocho Jul 16, 2024
333eaf5
design: 푸터 디자인 수정
cobocho Jul 16, 2024
9e5d812
fix: api 변경사항 적용
cobocho Jul 16, 2024
be7aaab
fix: 누락된 페이지 복구
cobocho Jul 16, 2024
35af46c
fix: 아이콘 오류 해결
cobocho Jul 16, 2024
03d60d2
fix: 아이콘 빌드 에러 수정
cobocho Jul 17, 2024
4fe5056
chore: 도커 빌드 테스트
cobocho Jul 17, 2024
2a0ee44
fix: 아이콘 경로 수정
cobocho Jul 17, 2024
6ab30d8
fix: Feedback 0718 - 1,2,5,6,7 수정
hin6150 Jul 18, 2024
51313d5
Merge branch 'main' into landing-page
cobocho Jul 18, 2024
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
3 changes: 1 addition & 2 deletions apps/web/.env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
NEXT_PUBLIC_DOMAIN=http://localhost:3000
NEXT_PUBLIC_API_URL=https://dev-api.vook.app
NEXT_PUBLIC_GOOGLE_LOGIN_URL=https://dev-api.vook.app/oauth2/authorization/google
NEXT_PUBLIC_API_URL=https://dev-api.vook.app
2 changes: 1 addition & 1 deletion apps/web/.env.production
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
NEXT_PUBLIC_DOMAIN=https://vook.app
NEXT_PUBLIC_API_URL=https://api.vook.app
NEXT_PUBLIC_GOOGLE_LOGIN_URL=https://api.vook.app/oauth2/authorization/google
NEXT_PUBLIC_GOOGLE_LOGIN_URL=https://api.vook.app/oauth2/authorization/google
2 changes: 1 addition & 1 deletion apps/web/.env.staging
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
NEXT_PUBLIC_DOMAIN=https://stag.vook.app
NEXT_PUBLIC_API_URL=https://stag-api.vook.app
NEXT_PUBLIC_GOOGLE_LOGIN_URL=https://stag-api.vook.app/oauth2/authorization/google
NEXT_PUBLIC_GOOGLE_LOGIN_URL=https://stag-api.vook.app/oauth2/authorization/google
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@vook-client/api": "*",
"@vook-client/design-system": "*",
"dayjs": "^1.11.11",
"framer-motion": "^11.3.2",
"js-cookie": "^3.0.5",
"next": "^14.1.1",
"react": "^18.2.0",
Expand Down
Binary file added apps/web/public/image/Excel.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 apps/web/public/image/File.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 apps/web/public/image/Folder.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 apps/web/public/image/Jira.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 apps/web/public/image/Notion.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 apps/web/public/image/Pen.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 apps/web/public/image/Star.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 apps/web/public/image/spredadSheet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions apps/web/src/app/(afterLogin)/layout.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ export const mainArea = style({

minHeight: `calc(100vh - ${HEADER_HEIGHT}px)`,

padding: 40,
// paddingBottom: 400,

marginTop: HEADER_HEIGHT,
marginLeft: SIDE_BAR_WIDTH,

padding: '40px',

display: 'flex',
flexDirection: 'column',
})
Expand Down
7 changes: 6 additions & 1 deletion apps/web/src/app/(afterLogin)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Header } from '@/components/Header'
import { UserProvider } from '@/store/user'
import { getQueryClient } from '@/utils/react-query'
import { SilentRefresh } from '@/components/SilentRefresh/SilentRefresh'
import { SearchBox, SearchHistoryProvider } from '@/components/SearchBox'

import { mainArea } from './layout.css'

Expand Down Expand Up @@ -43,7 +44,11 @@ const Layout = async ({ children }: PropsWithChildren) => {
<div className={mainArea}>
<HydrationBoundary state={dehydrateState}>
<UserProvider user={user.result}>
<Header />
<Header>
<SearchHistoryProvider>
<SearchBox />
</SearchHistoryProvider>
</Header>
<Sidebar />
{children}
</UserProvider>
Expand Down
48 changes: 0 additions & 48 deletions apps/web/src/app/(afterLogin)/page.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,16 @@ export const highlightHit = style({
export const highlight = style({
backgroundColor: vars.colors.yellow,
})

export const dropboxItem = style({
display: 'flex',
alignItems: 'center',
width: 174,
gap: 10,
})

export const headerIconContainer = style({
display: 'flex',
alignItems: 'center',
gap: 2,
})
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,22 @@ import {
termSort,
useDeleteTermMutation,
useGetTermQuery,
GetTermResponse,
TermSortValues,
} from '@vook-client/api'
import { useQueryClient } from '@tanstack/react-query'
import { usePathname, useSearchParams } from 'next/navigation'
import clsx from 'clsx'
import {
GetTermResponse,
TermSortValues,
} from 'node_modules/@vook-client/api/src/services/term/model'

import { useToast } from '@/hooks/useToast'
import { useVocabularyStore } from '@/store/term'
import { useModal } from '@/hooks/useModal'
import { ModalTypes } from '@/hooks/useModal/useModal'
import { LoadingComponent, NoneDataComponent } from '@/components/common'

import {
LoadingComponent,
NoneDataComponent,
} from '../../../../../../components/common/Common'

import {
dropboxItem,
headerIconContainer,
highlight,
highlightHit,
termContainer,
Expand All @@ -37,8 +33,6 @@ import {
textContainer,
} from './Term.css'

import { dropboxItem } from 'src/app/(afterLogin)/workspace/VocabularyItem.css'

const TextContainer = ({ length }: { length?: number }) => (
<div className={textContainer}>
<Text type="body-1">👀 용어목록</Text>
Expand All @@ -51,9 +45,11 @@ const TextContainer = ({ length }: { length?: number }) => (
const SortableListHeader = ({
handleSort,
response,
sorts,
}: {
response: GetTermResponse
handleSort: (sort: TermSort) => void
sorts: TermSortValues[]
}) => {
const { checkList, handleCheckList } = useVocabularyStore()

Expand All @@ -74,29 +70,59 @@ const SortableListHeader = ({
kind="title"
onClick={() => handleSort(termSort.Term)}
>
용어
<div className={headerIconContainer}>
용어
{sorts.includes(termSort.Term.Asc) && <Icon name="arrow-up-small" />}
{sorts.includes(termSort.Term.Desc) && (
<Icon name="arrow-down-small" />
)}
</div>
</List>
<List
variant="reading"
kind="title"
onClick={() => handleSort(termSort.Synonym)}
>
동의어
<div className={headerIconContainer}>
동의어
{sorts.includes(termSort.Synonym.Asc) && (
<Icon name="arrow-up-small" />
)}
{sorts.includes(termSort.Synonym.Desc) && (
<Icon name="arrow-down-small" />
)}
</div>
</List>
<List
variant="reading"
kind="title"
style={{ flex: 1 }}
onClick={() => handleSort(termSort.Meaning)}
>
<div className={headerIconContainer}>
{sorts.includes(termSort.Meaning.Asc) && (
<Icon name="arrow-up-small" />
)}
{sorts.includes(termSort.Meaning.Desc) && (
<Icon name="arrow-down-small" />
)}
</div>
</List>
<List
variant="reading"
kind="title"
onClick={() => handleSort(termSort.CreatedAt)}
>
생성일자
<div className={headerIconContainer}>
생성일자
{sorts.includes(termSort.CreatedAt.Asc) && (
<Icon name="arrow-up-small" />
)}
{sorts.includes(termSort.CreatedAt.Desc) && (
<Icon name="arrow-down-small" />
)}
</div>
</List>
<List variant="reading" kind="icon" />
</div>
Expand Down Expand Up @@ -293,7 +319,11 @@ export const Term = () => {
{response?.result.length ? (
<>
<TextContainer length={response?.result.length} />
<SortableListHeader handleSort={handleSort} response={response} />
<SortableListHeader
handleSort={handleSort}
response={response}
sorts={sorts}
/>
{response?.result.map((termData) => (
<TermItem
key={termData.termUid}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ import { Dropbox, Icon, Text } from '@vook-client/design-system'
import { useModal } from '@/hooks/useModal'
import { ModalTypes } from '@/hooks/useModal/useModal'

import { VocabularyModalDataType } from '../page'

import {
dropboxItem,
vocabularyItemContainer,
vocabularyItemFooter,
vocabularyItemHeader,
} from './VocabularyItem.css'
import { VocabularyModalDataType } from './page'

interface VocabularyItem {
id: string
Expand Down
34 changes: 34 additions & 0 deletions apps/web/src/app/(afterLogin)/workspace/layout.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { style } from '@vanilla-extract/css'

export const workspaceContainer = style({
display: 'flex',
flexDirection: 'column',
flex: 1,
gap: 40,
height: '100%',
})

export const workspaceInnerContainer = style({
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
flex: 1,
})

export const workspaceInnerAlignCenter = style({
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: '24px',
})

export const workspaceInnerAlignRow = style({
display: 'flex',
alignSelf: 'start',
flexWrap: 'wrap',
gap: 20,
})
export const workspaceHeader = style({
display: 'flex',
justifyContent: 'space-between',
})
41 changes: 41 additions & 0 deletions apps/web/src/app/(afterLogin)/workspace/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { PropsWithChildren } from 'react'
import { userService, UserStatus } from '@vook-client/api'
import { cookies, headers } from 'next/headers'
import { redirect } from 'next/navigation'
import { dehydrate, HydrationBoundary } from '@tanstack/react-query'

import { getQueryClient } from '@/utils/react-query'

const Layout = async ({ children }: PropsWithChildren) => {
const cookieStore = cookies()
const isAuthorization = headers().get('X-AuthConfirm')

if (isAuthorization !== 'confirmed') {
redirect('/login')
}

const access = cookieStore.get('access')?.value || ''
const refresh = cookieStore.get('refresh')?.value || ''

if (!access && !refresh) {
redirect('/login')
}

const queryClient = getQueryClient()
queryClient.setQueryData(['access'], access)
queryClient.setQueryData(['refresh'], refresh)

const user = await userService.userInfo(queryClient)

if (user.result.status !== UserStatus.Registered) {
redirect('/signup')
}

const dehydrateState = dehydrate(queryClient)

return (
<HydrationBoundary state={dehydrateState}>{children}</HydrationBoundary>
)
}

export default Layout
Loading
Loading