-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Feat] 게시글 및 유저 차단
- Loading branch information
Showing
22 changed files
with
308 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"use client"; | ||
|
||
import Modal from "src/components/common/Modal"; | ||
import { useRouter } from "next/navigation"; | ||
import useUnBlockFriendMutation from "src/hooks/account/useUnBlockFriendMutation"; | ||
|
||
export default function UnBlockModal({ params }: { params: { id: number } }) { | ||
const router = useRouter(); | ||
const unblockFriend = useUnBlockFriendMutation(); | ||
|
||
return ( | ||
<Modal | ||
handleClose={() => router.back()} | ||
title="차단을 해제하시겠어요?" | ||
detail="쪽지 수신 및 발신이 모두 가능해집니다." | ||
rightText="차단 해제" | ||
rightClick={() => { | ||
unblockFriend.mutate(params.id); | ||
}} | ||
/> | ||
); | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
"use client"; | ||
import Flex from "src/components/common/Flex"; | ||
import Text from "src/components/common/Text"; | ||
import styled from "styled-components"; | ||
import { colors } from "styles/theme"; | ||
|
||
import useBlockFriendMutation from "src/hooks/account/useBlockFriendMutation"; | ||
import { useAppSelector, useAppDispatch } from "src/hooks/useReduxHooks"; | ||
import { changeAction } from "src/reducer/slices/bottomSheet/bottomSheetSlice"; | ||
import { useRouter } from "next/navigation"; | ||
|
||
const ReportBlock = () => { | ||
const blockFriend = useBlockFriendMutation(); | ||
const dispatch = useAppDispatch(); | ||
const router = useRouter(); | ||
|
||
const { selectedIdx } = useAppSelector((state) => state.bottomSheet); | ||
|
||
return ( | ||
<Flex height="100%" direction="column"> | ||
<Menu | ||
border | ||
onClick={() => { | ||
blockFriend.mutate(selectedIdx); | ||
dispatch( | ||
changeAction({ | ||
type: "bottomSheet", | ||
value: { on: false } | ||
}) | ||
); | ||
}} | ||
> | ||
<Text typo="Subtitle2r">차단하기</Text> | ||
</Menu> | ||
<Menu | ||
onClick={() => { | ||
dispatch( | ||
changeAction({ | ||
type: "bottomSheet", | ||
value: { on: false } | ||
}) | ||
); | ||
}} | ||
> | ||
<Text typo="Subtitle2r" color="primary_qred"> | ||
신고하기 | ||
</Text> | ||
</Menu> | ||
</Flex> | ||
); | ||
}; | ||
|
||
const Menu = styled.div<{ border?: boolean }>` | ||
width: 100%; | ||
padding: 1rem 0; | ||
display: flex; | ||
justify-content: center; | ||
border-bottom: ${({ border }) => | ||
border && `1px solid ${colors.line_black_5}`}; | ||
`; | ||
|
||
export default ReportBlock; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from "react"; | ||
|
||
const DotsHoriz = () => { | ||
return ( | ||
<svg | ||
width="24" | ||
height="25" | ||
viewBox="0 0 24 25" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M6.5 12.5C6.5 11.3954 5.60457 10.5 4.5 10.5C3.39543 10.5 2.5 11.3954 2.5 12.5C2.5 13.6046 3.39543 14.5 4.5 14.5C5.60457 14.5 6.5 13.6046 6.5 12.5Z" | ||
fill="white" | ||
/> | ||
<path | ||
d="M14 12.5C14 11.3954 13.1046 10.5 12 10.5C10.8954 10.5 10 11.3954 10 12.5C10 13.6046 10.8954 14.5 12 14.5C13.1046 14.5 14 13.6046 14 12.5Z" | ||
fill="white" | ||
/> | ||
<path | ||
d="M21.5 12.5C21.5 11.3954 20.6046 10.5 19.5 10.5C18.3954 10.5 17.5 11.3954 17.5 12.5C17.5 13.6046 18.3954 14.5 19.5 14.5C20.6046 14.5 21.5 13.6046 21.5 12.5Z" | ||
fill="white" | ||
/> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default DotsHoriz; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import styled from "styled-components"; | ||
import { KeyOfColor } from "styles/theme"; | ||
import { colors } from "styles/theme"; | ||
|
||
const Line = styled.div<{ | ||
border?: number; | ||
color?: KeyOfColor; | ||
}>` | ||
width: 100%; | ||
height: ${({ border }) => (border ? border : 1)}px; | ||
color: ${({ color }) => (color ? colors[color] : colors.light_qblack)}; | ||
border: none; | ||
`; | ||
|
||
export default Line; |
Oops, something went wrong.