File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,11 @@ const SearchPage: NextPage<Props> = (props) => {
4444 < Layout { ...props } >
4545 < Search isShowText = { false } />
4646 { data === undefined ? (
47- < div v-if = "loading === true" className = { styles . loader } >
47+ < div className = { styles . loader } >
4848 < img className = { styles . loadingIcon } src = "/images/icon_loading.svg" alt = "検索中..." />
4949 </ div >
50+ ) : data . contents . length === 0 ? (
51+ < div className = { styles . loader } > 記事がありません</ div >
5052 ) : (
5153 < BlogList contents = { data . contents } />
5254 ) }
Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ const Container: React.VFC<ContainerProps> = (props) => {
2828
2929 const router = useRouter ( )
3030 const handleKeyPress : Props [ 'onKeyPress' ] = ( event ) => {
31+ if ( value === '' ) {
32+ return
33+ }
3134 if ( event . key === 'Enter' ) {
3235 router . push ( {
3336 pathname : pagesPath . search . $url ( ) . pathname ,
You can’t perform that action at this time.
0 commit comments