Skip to content

Commit

Permalink
Merge pull request #262 from Team-TenTen/feature/#261/private-space-icon
Browse files Browse the repository at this point in the history
비공개 스페이스에 자물쇠 아이콘 추가
  • Loading branch information
dudwns authored Dec 4, 2023
2 parents 9996293 + cdd2d5a commit 0d0801c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/app/(routes)/space/[spaceId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const SpacePage = ({ params }: { params: { spaceId: number } }) => {
favorite={space.favoriteCount}
hasFavorite={space.hasFavorite}
hasScrap={space.hasScrap}
isVisible={space.isVisible}
/>
)}
{tabList.length > MIN_TAB_NUMBER && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/AvatarGroup/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const MARGIN_LEFT_DIVIDE = 12
export const MARGIN_LEFT_DIVIDE = 13
export const PADDING_LEFT_DIVIDE = 7
export const DEFAULT_SIZE = 60
export const DEFAULT_LIMIT = 3
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/LinkItem/LinkItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ const LinkItem = ({
message: LINK_FORM_VALIDATION.TITLE_LENGTH,
},
maxLength: {
value: 50,
value: 100,
message: LINK_FORM_VALIDATION.TITLE_LENGTH,
},
required: {
Expand Down
9 changes: 1 addition & 8 deletions src/components/common/LinkList/LinkList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@ const LinkList = ({
tagId,
})

const isValidUrl = () => {
const url = getValues('url')
console.log(url)
var urlPattern = /^(https?:\/\/|file:\/\/)/
return urlPattern.test(url)
}

return isLinksLoading ? (
<Spinner />
) : (
Expand Down Expand Up @@ -240,7 +233,7 @@ const LinkList = ({
message: LINK_FORM_VALIDATION.TITLE_LENGTH,
},
maxLength: {
value: 50,
value: 100,
message: LINK_FORM_VALIDATION.TITLE_LENGTH,
},
required: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/LinkList/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const LINK_FORM_VALIDATION = {
URL_INVALID_FORM: '유효한 URL 형식이 아닙니다.',
URL_NOT_BUTTTON: 'URL 입력 후 확인 버튼을 눌러주세요.',
NONE_TITLE: '제목을 입력해 주세요.',
TITLE_LENGTH: '제목은 2자 이상 50자 이하로 작성해야 합니다.',
TITLE_LENGTH: '제목은 2자 이상 100자 이하로 작성해야 합니다.',
TAG_LENGTH: '태그는 10자 이하로 작성해야 합니다.',
}

Expand Down
10 changes: 8 additions & 2 deletions src/components/common/Space/Space.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

import { useModal } from '@/hooks'
import { useCurrentUser } from '@/hooks/useCurrentUser'
import { StarIcon as StarIconOutline } from '@heroicons/react/24/outline'
import {
LockClosedIcon,
StarIcon as StarIconOutline,
} from '@heroicons/react/24/outline'
import { InboxArrowDownIcon } from '@heroicons/react/24/solid'
import { StarIcon as StarIconSolid } from '@heroicons/react/24/solid'
import Image from 'next/image'
Expand All @@ -27,6 +30,7 @@ interface SpaceProps {
favorite: number
hasFavorite?: boolean
hasScrap?: boolean
isVisible?: boolean
}

const Space = ({
Expand All @@ -41,6 +45,7 @@ const Space = ({
favorite,
hasFavorite,
hasScrap,
isVisible,
}: SpaceProps) => {
const router = useRouter()
const { isLoggedIn } = useCurrentUser()
Expand Down Expand Up @@ -147,8 +152,9 @@ const Space = ({
<div className="line-clamp-1 text-xs font-normal text-gray6">
{description}
</div>
<div className="flex grow items-center">
<div className="flex grow items-center justify-between">
<Chip label={category} />
{!isVisible && <LockClosedIcon className="h-4 w-4" />}
</div>
</div>
</div>
Expand Down

0 comments on commit 0d0801c

Please sign in to comment.