-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from prgrms-web-devcourse-final-project/154-f…
…eature/enhance-ux [Feature] #154 UX 개선
- Loading branch information
Showing
14 changed files
with
123 additions
and
65 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import { ReactNode } from 'react' | ||
import useClearModal from '~hooks/useClearModal' | ||
import useSubscribe from '~hooks/useSubscribe' | ||
import useToken from '~hooks/useToken' | ||
|
||
export default function GlobalHookContainer({ children }: { children: ReactNode }) { | ||
useToken() | ||
useSubscribe() | ||
useClearModal() | ||
return <>{children}</> | ||
} |
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,11 @@ | ||
import { useEffect } from 'react' | ||
import { useLocation } from 'react-router-dom' | ||
import { useModalStore } from '~stores/modalStore' | ||
|
||
export default function useClearModal() { | ||
const { pathname } = useLocation() | ||
const { clearModal } = useModalStore() | ||
useEffect(() => { | ||
clearModal() | ||
}, [pathname]) | ||
} |
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 |
---|---|---|
@@ -1,7 +1,19 @@ | ||
import { styled } from 'styled-components' | ||
import DogHowling from '~assets/dog_howling.svg' | ||
|
||
export const ChatArea = styled.div` | ||
position: relative; | ||
height: calc(100% - 64px); | ||
overflow: auto; | ||
&::after { | ||
background: url(${DogHowling}) center/cover; | ||
content: ''; | ||
width: 190px; | ||
height: 260px; | ||
position: fixed; | ||
bottom: 95px; | ||
left: 50%; | ||
translate: -50%; | ||
} | ||
` | ||
export const ChatMessageList = styled.div`` |
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
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
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,18 @@ | ||
/** | ||
* word에 받침이 있으면 "이랑" | ||
* 받침이 없으면 "랑" 반환 | ||
*/ | ||
export function getParticle(word: string) { | ||
const lastChar = word.charAt(word.length - 1) | ||
const unicodeValue = lastChar.charCodeAt(0) | ||
|
||
// 한글 유니코드 범위 체크 | ||
if (unicodeValue < 0xac00 || unicodeValue > 0xd7a3) { | ||
return word + '랑' | ||
} | ||
|
||
// 종성 확인 | ||
const hasConsonantJongseong = (unicodeValue - 0xac00) % 28 > 0 | ||
|
||
return hasConsonantJongseong ? '이랑' : '랑' | ||
} |