diff --git a/src/components/main/MainContents.jsx b/src/components/main/MainContents.jsx index d58ba4c3..72034a8a 100644 --- a/src/components/main/MainContents.jsx +++ b/src/components/main/MainContents.jsx @@ -11,11 +11,13 @@ import { useRouter } from 'next/navigation' import { globalLocaleStore } from '@/store/localeAtom' import { queryStringFormatter } from '@/util/common-utils' import MainSkeleton from '../ui/MainSkeleton' -import { SessionContext } from '@/app/SessionProvider' import { useMainContentsController } from '@/hooks/main/useMainContentsController' import { QcastContext } from '@/app/QcastProvider' +import { useSwal } from '@/hooks/useSwal' export default function MainContents() { + const { swalFire } = useSwal() + const { getMessage } = useMessage() const router = useRouter() const globalLocaleState = useRecoilValue(globalLocaleStore) @@ -125,62 +127,50 @@ export default function MainContents() { )} -
- {recentNoticeList.length > 0 ? ( - <> -
{dayjs(recentNoticeList[0]?.regDt).format('YYYY.MM.DD')}
-
{recentNoticeList[0]?.title}
-
') : '' }} - >
- - ) : ( - - )} -
+ {recentNoticeList.length > 0 ? ( +
+
{dayjs(recentNoticeList[0]?.regDt).format('YYYY.MM.DD')}
+
{recentNoticeList[0]?.title}
+
') : '' }} + >
+
+ ) : ( +
+

{getMessage('main.content.noBusiness')}

+
+ )}
- + {recentFaqList.length > 0 ? ( + + ) : ( +
+

{getMessage('main.content.noBusiness')}

+
+ )}
- -
diff --git a/src/styles/_layout.scss b/src/styles/_layout.scss index a549ad0e..858ab351 100644 --- a/src/styles/_layout.scss +++ b/src/styles/_layout.scss @@ -207,6 +207,7 @@ header{ .select-box{ min-width: 165px; margin-right: 8px; + height: 30px; >div{ width: 100%; } diff --git a/src/styles/_main.scss b/src/styles/_main.scss index 0733f285..5da1350d 100644 --- a/src/styles/_main.scss +++ b/src/styles/_main.scss @@ -155,6 +155,7 @@ .product-item-content{ margin-top: 30px; overflow: hidden; + height: 100%; .recently-list{ .recently-item{ border: 1px solid #F2F2F2; @@ -208,6 +209,25 @@ } } } + .recently-no-data{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100%; + h3{ + font-size: 16px; + color: #101010; + font-weight: 600; + margin-bottom: 5px; + } + p{ + font-size: 12px; + color: #666; + font-weight: 400; + margin-bottom: 10px; + } + } .notice-box{ height: 100%; overflow-y: auto;