Skip to content

Commit

Permalink
feat: 공유 링크 생성 시 encryptedUserId 사용
Browse files Browse the repository at this point in the history
  • Loading branch information
nim-od committed Aug 17, 2024
1 parent d63f648 commit d934015
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function RacingCard() {
<div className="bg-foreground/10 flex flex-col items-center rounded-[5px] p-4 pt-2 backdrop-blur-sm">
<CardTitle name={user?.name} />
{type ? (
<ShareCountTeamCard type={type} size="racing" />
<ShareCountTeamCard type={type} encryptedUserId={user?.encryptedUserId} size="racing" />
) : (
<ProtectedTeamSelectModal
openTrigger={
Expand Down
6 changes: 4 additions & 2 deletions packages/user/src/components/shared/ShareCountTeamCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ import TeamCardTemplate from './teamCardTemplate/index.tsx';

type ShareCountTeamCardProps = {
type: Category;
encryptedUserId: string | undefined
size: 'racing' | 'modal';
};
export default function ShareCountTeamCard({ type, size }: ShareCountTeamCardProps) {
const url = getSharedLink({ type });
export default function ShareCountTeamCard({
type, encryptedUserId, size }: ShareCountTeamCardProps) {
const url = getSharedLink({ type, encryptedUserId });

return (
<TeamCardTemplate type={type} size={size}>
Expand Down
2 changes: 1 addition & 1 deletion packages/user/src/components/shared/linkShare/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface LinkShareProps {
export default function LinkShare({ category }: LinkShareProps) {
const { user } = useAuth();

const url = getSharedLink({ type: user?.type });
const url = getSharedLink({ type: user?.type, encryptedUserId: user?.encryptedUserId });

const variants = category ?? 'default';

Expand Down

0 comments on commit d934015

Please sign in to comment.