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

ListyWave Ver2.0.2 : IOS PWA 설치 유도 팝업 / 마이페이지 클릭 안됨 이슈 핫픽스 / 탐색페이지 이슈 해결 #231

Merged
merged 3 commits into from
Apr 22, 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
Binary file added public/images/section7_phone2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 32 additions & 1 deletion public/sw.js.map

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

Binary file added public/videos/record_video.mp4
Binary file not shown.
Binary file added public/videos/video_section3.mp4
Binary file not shown.
32 changes: 26 additions & 6 deletions src/app/account/_components/LanguageDropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,42 @@
import { useState } from 'react';
import { useCallback, useEffect, useRef } from 'react';

import * as styles from './LanguageDropdown.css';
import useBooleanOutput from '@/hooks/useBooleanOutput';
import useOnClickOutside from '@/hooks/useOnClickOutside';

import { useLanguage } from '@/store/useLanguage';
import { accountLocale } from '@/app/account/locale';
import useBooleanOutput from '@/hooks/useBooleanOutput';

export default function LanguageDropdown() {
const { isOn, toggle, handleSetOff } = useBooleanOutput();
const { ref } = useOnClickOutside(handleSetOff);
const dropDownRef = useRef<HTMLDivElement>(null);
const { isOn, handleSetOff, toggle } = useBooleanOutput();
const { language, setLanguage } = useLanguage();

const handleSelectLanguage = (language: 'ko' | 'en') => {
setLanguage(language);
handleSetOff();
};

const handleClickOutside = useCallback(
(e: Event) => {
if (dropDownRef.current !== null && !dropDownRef.current.contains(e.target as Node)) {
handleSetOff();
}
},
[handleSetOff]
);

useEffect(() => {
document.addEventListener('mousedown', handleClickOutside);
document.addEventListener('touchend', handleClickOutside);

return () => {
document.removeEventListener('mousedown', handleClickOutside);
document.addEventListener('touchend', handleClickOutside);
};
}, [handleClickOutside]);

return (
<div ref={ref} className={styles.container}>
<div className={styles.container} ref={dropDownRef}>
<div className={styles.triggerDiv} onClick={toggle}>
{language === 'ko' ? accountLocale[language].korean : accountLocale[language].english}
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/app/intro/_components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ function Footer() {
</div>
<div className={styles.policyWrapper}>
<p>{introLocale[language].privacy}</p>
<p>[email protected]</p>
<p>에잇(Eight)</p>
<p>Makers : 에잇(Eight, [email protected])</p>
<p>Copyright ©Listywave - All rights reserved</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/intro/_components/MotionWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function MotionWrapper({ children, delay, variantsType = 'vertical' }: MotionWra

const ref = useIntersectionObserver(() => {
controls.start('visible');
}, 0.5);
}, 0.4);

return (
<motion.div
Expand Down
19 changes: 17 additions & 2 deletions src/app/intro/_components/Section3.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ import * as fonts from '@/styles/font.css';
export const background = style({
width: '100%',
height: '752px',
padding: '71px 30px 77px',
padding: '71px 0 77px',

backgroundColor: vars.color.white,
});

export const wrapper = style({
position: 'relative',
display: 'flex',
flexDirection: 'column',
});

export const recordWrapper = style({
position: 'relative',
padding: '0 30px',
display: 'flex',
alignItems: 'center',
gap: '7px',
Expand Down Expand Up @@ -43,6 +46,8 @@ export const recText = style([fonts.labelLarge, {}]);
export const contentsWrapper = style({
margin: '55.5px 0 46px',

position: 'relative',

display: 'flex',
flexDirection: 'column',
alignItems: 'center',
Expand Down Expand Up @@ -75,15 +80,25 @@ export const subTitleWrapper = style([
]);

export const imageWrapper = style({
width: '100%',
height: '400px',
position: 'relative',
});

export const video = style({
width: '100%',
height: 'auto',

border: 'none',
});

// blurbox이 검은색으로 바뀌는 이상 현상이 있어서 잠시 주석화
export const blurBox = style({
width: '100%',
height: '174px',

position: 'absolute',
bottom: -40,
bottom: -20,

background: 'linear-gradient(180deg, rgba(255, 255, 255, 0.00) -8.85%, #FFF 53.58%)',
});
7 changes: 1 addition & 6 deletions src/app/intro/_components/Section3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ function Section3() {
<span>{introLocale[language].section.message6}</span>
</div>
<div className={styles.imageWrapper}>
<Image
src={'/images/list_section3.png'}
alt={introLocale[language].section.createListImage}
width={300}
height={314}
/>
<video src={'/videos/video_section3.mp4'} autoPlay loop muted className={styles.video} />
<div className={styles.blurBox}></div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/intro/_components/Section7.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function Section7() {
<div className={styles.linkWrapper}>listywave.com/user/1</div>
</MotionWrapper>
<Image
src={'/images/section7_phone.png'}
src={'/images/section7_phone2.png'}
alt={introLocale[language].section.cellphoneImage}
width={255}
height={518}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const commentContent = style({
fontWeight: 500,
lineHeight: 'normal',
letterSpacing: '-0.36px',
wordBreak: 'break-word',
});

export const deletedComment = style({
Expand Down
14 changes: 10 additions & 4 deletions src/app/list/[listId]/_components/ListDetailOuter/Comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import timeDiff from '@/lib/utils/time-diff';
import { QUERY_KEYS } from '@/lib/constants/queryKeys';
import { CommentType } from '@/lib/types/commentType';
import { UserType } from '@/lib/types/userProfileType';
import { useCommentId } from '@/store/useComment';
import { useCommentId, useCommentStatus } from '@/store/useComment';
import { commentLocale } from '@/app/list/[listId]/locale';

import * as styles from './Comment.css';
Expand All @@ -25,9 +25,10 @@ import { useLanguage } from '@/store/useLanguage';
*/
interface CommentProps {
comment?: CommentType;
onUpdate: (userName?: string) => void;
setActiveNickname: (userName?: string) => void;
activeNickname?: string | null;
handleSetCommentId: (id: number | undefined) => void;
handleSetComment: (comment: string) => void;
listId?: number;
commentId?: number;
currentUserInfo?: UserType;
Expand All @@ -36,17 +37,18 @@ interface CommentProps {

function Comment({
comment,
onUpdate,
setActiveNickname: onUpdate,
handleSetCommentId,
handleSetComment,
listId,
commentId,
currentUserInfo,

handleEdit,
}: CommentProps) {
const { language } = useLanguage();
const queryClient = useQueryClient();
const { setCommentId } = useCommentId();
const { setStatusCreateReply, setStatusEdit } = useCommentStatus();

//현재 작성중인 답글의 원댓글 정보를 업데이트 하는 로직
const handleActiveNicknameAndIdUpdate = () => {
Expand All @@ -55,11 +57,15 @@ function Comment({
if (!currentUserName && !currentCommentId) {
return null;
}
handleSetComment('');
setStatusCreateReply();
onUpdate(currentUserName);
handleSetCommentId(currentCommentId);
};

//수정하기 버튼을 누르면 실행되는 함수
const handleEditButtonClick = (comment: string) => {
setStatusEdit();
handleEdit(comment);
setCommentId(commentId as number);
};
Expand Down
Loading