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

#743 추천인 시스템 만들기 #748

Merged
merged 32 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
38a337e
Add referer
predict-woo Feb 22, 2024
1bdb6ca
Merge branch 'dev' into #743-create-referer-system
predict-woo Feb 22, 2024
387d1c7
Fix home
predict-woo Feb 22, 2024
8fba4bc
Add modal
predict-woo Feb 22, 2024
5bf639c
Fix modals
predict-woo Feb 22, 2024
8964c7e
Fix wierd profile
predict-woo Feb 22, 2024
a05ccd3
Fix last minute
predict-woo Feb 22, 2024
8b89f23
Fix change button name
predict-woo Feb 22, 2024
973a858
Fix photo
predict-woo Feb 22, 2024
860202a
Add: kakao sharing
predict-woo Feb 22, 2024
ce77401
Fix image
predict-woo Feb 22, 2024
df728be
Fix: Add quest container
predict-woo Feb 22, 2024
6a67ffe
Add:dday
predict-woo Feb 22, 2024
d981438
Fix: link
predict-woo Feb 22, 2024
52e38fb
Fix: event join bugs
kmc7468 Feb 22, 2024
79b02b3
Refactor: getDday function
kmc7468 Feb 22, 2024
d408efb
Fix: login 유도
predict-woo Feb 22, 2024
540047b
Merge branch '#743-create-referer-system' of https://github.com/sparc…
predict-woo Feb 22, 2024
41cc183
Fix: filter outgoing requests
predict-woo Feb 22, 2024
1917d9f
Fix: remove when none
predict-woo Feb 22, 2024
9462a42
Add: terms of 2024 spring event into my page
kmc7468 Feb 22, 2024
8e29eca
Refactor: ModalEvent2024SpringJoin.tsx
kmc7468 Feb 22, 2024
3615d8b
Refactor: selectively display terms of events in my page
kmc7468 Feb 22, 2024
b7d3116
Fix: some margin
kmc7468 Feb 22, 2024
cff94e4
Refactor: margin between input elements
kmc7468 Feb 22, 2024
0ea5bb5
Refactor: ModalEvent2024SpringJoin.tsx
kmc7468 Feb 23, 2024
a87f6bc
Fix: typos in Event2024Spring.tsx
kmc7468 Feb 23, 2024
24471f3
Fix: error when sharing without 참여
predict-woo Feb 23, 2024
a356acb
Merge branch '#743-create-referer-system' of https://github.com/sparc…
predict-woo Feb 23, 2024
9c3a537
Refactor: some comments
kmc7468 Feb 23, 2024
032c7ec
Fix: invalid error message
kmc7468 Feb 23, 2024
14cb94a
Fix: build error
kmc7468 Feb 23, 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
Binary file added packages/web/public/2024springEvent-graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import { useCallback, useEffect, useState } from "react";
import QRCode from "react-qr-code";

import ButtonShare from "@/components/Button/ButtonShare";
import DottedLine from "@/components/DottedLine";
import LinkCopy from "@/components/Link/LinkCopy";
import LinkKakaotalkShare from "@/components/Link/LinkKakaotalkShare";

import theme from "@/tools/theme";

import { ReactComponent as KakaoTalkLogo } from "@/static/assets/serviceLogos/KakaoTalkLogo.svg";
import CheckIcon from "@mui/icons-material/Check";
import ContentCopyIcon from "@mui/icons-material/ContentCopy";

export type BodyEvent2024SpringShareProps = {
inviteUrl: string;
height?: number;
};

const BodyEvent2024SpringShare = ({
height,
inviteUrl,
}: BodyEvent2024SpringShareProps) => {
const { origin } = window.location;

const [isCopied, setIsCopied] = useState(false);
const onCopy = useCallback(() => setIsCopied(true), [setIsCopied]);

useEffect(() => {
if (isCopied) {
const timer = setTimeout(() => setIsCopied(false), 1000);
return () => clearTimeout(timer);
}
}, [isCopied]);

const styleWrapper = height
? {
height,
display: "flex",
flexDirection: "column" as any,
}
: {};

const styleGuide = {
...theme.font12,
color: theme.gray_text,
margin: "0 8px 12px",
};
const styleQRSection = {
marginTop: "12px",
position: "relative" as any,
overflow: "hidden",
textAlign: "center" as any,
};
const styleButtonSection = {
display: "flex",
justifyContent: "center",
gap: "10px",
margin: "12px 0px 0",
};

return (
<div css={styleWrapper}>
<div css={styleGuide}>
이벤트를 여러 사람들에게 공유할 수 있습니다. 이 링크를 통해 다른
사용자가 이벤트에 참여하면, 회원님과 새 참여자 모두{" "}
<b>50 넙죽코인을 획득</b>합니다.
</div>
<DottedLine />
<div css={{ flexGrow: 1 }} />
<div css={styleQRSection}>
<QRCode value={inviteUrl} size={120} bgColor="none" />
</div>
<div css={{ flexGrow: 1 }} />
<div css={styleButtonSection}>
<LinkKakaotalkShare
title={"새터반 택시대제전 이벤트"}
description={`새터반 택시대제전 이벤트에 참여해보세요!`}
imageUrl={origin + "/2024springEvent-graph.png"}
buttonText="확인하기"
buttonTo={new URL(inviteUrl).pathname}
partNum={1}
>
<ButtonShare
text="카카오톡"
icon={<KakaoTalkLogo css={{ width: "22px" }} />}
background="#FFE812"
/>
</LinkKakaotalkShare>
<LinkCopy
value={`새터반 택시대제전 이벤트에 참여하세요!\n🚕 참여 링크: ${inviteUrl}`}
onCopy={onCopy}
>
<ButtonShare
text="초대 복사"
icon={
isCopied ? (
<CheckIcon style={{ fontSize: "16px" }} />
) : (
<ContentCopyIcon style={{ fontSize: "16px" }} />
)
}
background={theme.gray_background}
/>
</LinkCopy>
</div>
</div>
);
};

export default BodyEvent2024SpringShare;
Loading
Loading