Skip to content

Commit

Permalink
Merge pull request #62 from cau-likelion-org/feat/#61
Browse files Browse the repository at this point in the history
Feat/#61
  • Loading branch information
cjy3458 authored Jan 21, 2024
2 parents b252211 + ccc2729 commit 80adc39
Show file tree
Hide file tree
Showing 21 changed files with 6,836 additions and 6,814 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ env:
NEXT_PUBLIC_GOOGLE_CLIENT_ID: '${{secrets.NEXT_PUBLIC_GOOGLE_CLIENT_ID}}'
NEXT_PUBLIC_GOOGLE_REDIRECT_URI: '${{secrets.NEXT_PUBLIC_GOOGLE_REDIRECT_URI}}'
NEXT_PUBLIC_GOOGLE_SCOPE: '${{secrets.NEXT_PUBLIC_GOOGLE_SCOPE}}'
NEXT_PUBLIC_GOOGLE_ANALYTICS: '${{secrets.NEXT_PUBLIC_GOOGLE_ANALYTICS}}'
NEXT_PUBLIC_API_KEY: '${{secrets.NEXT_PUBLIC_API_KEY}}'
NEXT_PUBLIC_NOTION_KEY: '${{secrets.NEXT_PUBLIC_NOTION_KEY}}'
NEXT_PUBLIC_NOTION_DATABASE_ID: '${{secrets.NEXT_PUBLIC_NOTION_DATABASE_ID}}'
Expand Down
5 changes: 3 additions & 2 deletions .production/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cau-likelion-next:
component: '@sls-next/serverless-component'
inputs:
deploy: true
bucketName: 'cau-likelion'
bucketName: 'cau-like-lion'
bucketRegion: 'ap-northeast-2'
nextConfigDir: '../'
name:
Expand All @@ -11,4 +11,5 @@ cau-likelion-next:
timeout: 30
memory: 1024
cloudfront:
comment: 'next deploy' # CloudFront μ„€λͺ… μ„€μ •
comment: 'next deploy' # CloudFront μ„€λͺ… μ„€μ •
distributionId: 'E2G1YIN91GY4FL'
6 changes: 3 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const nextConfig = {
dangerouslyAllowSVG: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
domains: [
'cau-likelion.s3.ap-northeast-2.amazonaws.com',
'chunghaha.s3.ap-northeast-2.amazonaws.com',
'dsu3068f46mzk.cloudfront.net',
'cau-like-lion.s3.ap-northeast-2.amazonaws.com',
'chunghahaha.s3.ap-northeast-2.amazonaws.com',
'd1sgygn8l0lfd5.cloudfront.net',
],
},
webpack(config) {
Expand Down
93 changes: 15 additions & 78 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dependencies": {
"@next/font": "13.1.1",
"@notionhq/client": "^2.2.3",
"@types/gtag.js": "^0.0.18",
"@types/node": "18.11.18",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.10",
Expand Down
Binary file added public/image/μ˜€λ¦¬μ±—.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/image/μœ„ν‚€.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/image/탕후루.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/image/휠패슀.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 5 additions & 3 deletions src/components/common/header/MobileNavModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { IMenu } from './NavBar';
import NavButton from './NavButton';
import NavProfileCard from './NavProfileCard';

const MobileNavModal = ({ isModalOn }: { isModalOn: boolean; }) => {
const MobileNavModal = ({ isModalOn }: { isModalOn: boolean }) => {
const { access: tokenState } = useRecoilValue(token);
const [visibilityAnimation, setVisibilityAnimation] = useState(false);
const [repeat, setRepeat] = useState<any>(null);
Expand All @@ -21,6 +21,8 @@ const MobileNavModal = ({ isModalOn }: { isModalOn: boolean; }) => {
{ title: 'ν”„λ‘œμ νŠΈ', routing: '/project' },
{ title: 'μ„Έμ…˜', routing: '/session' },
{ title: 'μΆ”μ–΅', routing: '/gallery' },
{ title: 'μœ„ν‚€', routing: 'https://wiki.cau-likelion.org', target: '_blank' },
{ title: 'ν”Όλ“œ', routing: 'https://blog.cau-likelion.org', target: '_blank' },
];

useEffect(() => {
Expand All @@ -46,7 +48,7 @@ const MobileNavModal = ({ isModalOn }: { isModalOn: boolean; }) => {
<ButtonWrapper>
{isLogin && <NavButton title={'μΆœμ„μ²΄ν¬'} routing={'/attendance'} />}
{menu.map((m, i) => (
<NavButton key={i} title={m.title} routing={m.routing} />
<NavButton key={i} title={m.title} routing={m.routing} target={m.target} />
))}
</ButtonWrapper>
</Wrapper>
Expand All @@ -57,7 +59,7 @@ const MobileNavModal = ({ isModalOn }: { isModalOn: boolean; }) => {

export default MobileNavModal;

const Layer = styled.div<{ isModalOn: boolean; }>`
const Layer = styled.div<{ isModalOn: boolean }>`
max-width: 100vw;
width: 100%;
display: ${(props) => (props.isModalOn ? 'block' : 'none')};
Expand Down
13 changes: 8 additions & 5 deletions src/components/common/header/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ export interface IHoverButton {
export interface IMenu {
title: string;
routing: string;
target?: string;
}

const NavBar = () => {
const { access: tokenState } = useRecoilValue(token);
const [isLogin, setIsLogin] = useState(false);
const [isLogin, setIsLogin] = useState(true);

useEffect(() => {
if (tokenState) setIsLogin(true);
Expand All @@ -38,11 +39,13 @@ const NavBar = () => {
const menuDataSelector = (): IMenu[] => {
const resultArray = [
{ title: 'ν”„λ‘œμ νŠΈ', routing: '/project' },
{ title: 'μœ„ν‚€', routing: 'https://wiki.cau-likelion.org', target: '_blank' },
{ title: 'ν”Όλ“œ', routing: 'https://blog.cau-likelion.org', target: '_blank' },
{ title: isLogin ? 'MY' : 'Log in', routing: isLogin ? '/mypage' : '/login' },
];
if (isLogin) {
const [project, login] = resultArray;
return [project, { title: 'μΆœμ„μ²΄ν¬', routing: '/attendance' }, login];
const [project, wiki, feed, login] = resultArray;
return [project, wiki, feed, { title: 'μΆœμ„μ²΄ν¬', routing: '/attendance' }, login];
}
return resultArray;
};
Expand All @@ -61,8 +64,8 @@ const NavBar = () => {
</LogoWrapper>
<ButtonWrapper>
<HoverButton hover={hover} dropdown={dropdown} />
{menuDataSelector().map(({ title, routing }, index) => (
<NavButton key={index + routing} title={title} routing={routing} />
{menuDataSelector().map(({ title, routing, target }, index) => (
<NavButton key={index + routing} title={title} routing={routing} target={target} />
))}
</ButtonWrapper>
</Wrapper>
Expand Down
9 changes: 7 additions & 2 deletions src/components/common/header/NavButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,22 @@ import styled from 'styled-components';
interface INavBarButton {
title: string;
routing: string;
target?: string;
}

const NavButton = ({ title, routing }: INavBarButton) => {
const NavButton = ({ title, routing, target }: INavBarButton) => {
if (title === 'Log in' || title === 'MY')
return (
<Link href={routing}>
<LoginButton>{title}</LoginButton>
</Link>
);

return (
return target ? (
<a href={routing} target={target}>
<Button>{title}</Button>
</a>
) : (
<Link href={routing}>
<Button>{title}</Button>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion src/components/home/project/ProjectSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const ProjectSection = () => {
<FadeInComponent variants={fadeInAnimation}>
<Wrapper>
<TitleWrapper>
<Title>각 νŠΈλž™μ΄ λͺ¨μ—¬ ν•¨κ»˜ λ§Œλ“  ν”„λ‘œμ νŠΈ</Title>
<Title>ν”„λ‘œμ νŠΈ μ†Œκ°œ</Title>
<Text>λ©‹μŸμ΄ μ‚¬μžμ²˜λŸΌμ—μ„œ νƒ„μƒν•œ μ„œλΉ„μŠ€λ“€μ„ μ†Œκ°œν•©λ‹ˆλ‹€. </Text>
</TitleWrapper>
<ProjectSlider />
Expand Down
Loading

0 comments on commit 80adc39

Please sign in to comment.