Merge branch 'dev' of https://git.jetbrains.space/nalpari/q-cast-iii/qcast-front into dev-ck
This commit is contained in:
commit
145113bc71
@ -11,11 +11,13 @@ import { useRouter } from 'next/navigation'
|
|||||||
import { globalLocaleStore } from '@/store/localeAtom'
|
import { globalLocaleStore } from '@/store/localeAtom'
|
||||||
import { queryStringFormatter } from '@/util/common-utils'
|
import { queryStringFormatter } from '@/util/common-utils'
|
||||||
import MainSkeleton from '../ui/MainSkeleton'
|
import MainSkeleton from '../ui/MainSkeleton'
|
||||||
import { SessionContext } from '@/app/SessionProvider'
|
|
||||||
import { useMainContentsController } from '@/hooks/main/useMainContentsController'
|
import { useMainContentsController } from '@/hooks/main/useMainContentsController'
|
||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
|
import { useSwal } from '@/hooks/useSwal'
|
||||||
|
|
||||||
export default function MainContents() {
|
export default function MainContents() {
|
||||||
|
const { swalFire } = useSwal()
|
||||||
|
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
const globalLocaleState = useRecoilValue(globalLocaleStore)
|
||||||
@ -125,62 +127,50 @@ export default function MainContents() {
|
|||||||
)}
|
)}
|
||||||
</ProductItem>
|
</ProductItem>
|
||||||
<ProductItem num={2} name={getMessage('main.content.notice')}>
|
<ProductItem num={2} name={getMessage('main.content.notice')}>
|
||||||
<div className="notice-box">
|
{recentNoticeList.length > 0 ? (
|
||||||
{recentNoticeList.length > 0 ? (
|
<div className="notice-box">
|
||||||
<>
|
<div className="notice-day pre">{dayjs(recentNoticeList[0]?.regDt).format('YYYY.MM.DD')}</div>
|
||||||
<div className="notice-day pre">{dayjs(recentNoticeList[0]?.regDt).format('YYYY.MM.DD')}</div>
|
<div className="notice-title">{recentNoticeList[0]?.title}</div>
|
||||||
<div className="notice-title">{recentNoticeList[0]?.title}</div>
|
<div
|
||||||
<div
|
className="notice-contents"
|
||||||
className="notice-contents"
|
dangerouslySetInnerHTML={{ __html: recentNoticeList[0]?.contents ? recentNoticeList[0].contents.replaceAll('\n', '<br/>') : '' }}
|
||||||
dangerouslySetInnerHTML={{ __html: recentNoticeList[0]?.contents ? recentNoticeList[0].contents.replaceAll('\n', '<br/>') : '' }}
|
></div>
|
||||||
></div>
|
</div>
|
||||||
</>
|
) : (
|
||||||
) : (
|
<div className="recently-no-data">
|
||||||
<MainSkeleton count={5} />
|
<h3>{getMessage('main.content.noBusiness')}</h3>
|
||||||
)}
|
</div>
|
||||||
</div>
|
)}
|
||||||
</ProductItem>
|
</ProductItem>
|
||||||
</div>
|
</div>
|
||||||
<div className="main-product-list">
|
<div className="main-product-list">
|
||||||
<ProductItem num={3} name={getMessage('main.faq')}>
|
<ProductItem num={3} name={getMessage('main.faq')}>
|
||||||
<ul className="faq-list">
|
{recentFaqList.length > 0 ? (
|
||||||
{recentFaqList.length > 0 ? (
|
<ul className="faq-list">
|
||||||
<>
|
{recentFaqList.map((row) => {
|
||||||
{recentFaqList.map((row) => {
|
return (
|
||||||
return (
|
<li key={row.rowNumber} className="faq-item">
|
||||||
<li key={row.rowNumber} className="faq-item">
|
<div className="faq-item-inner">
|
||||||
<div className="faq-item-inner">
|
<div className="faq-num pre">FAQ {row.totCnt - row.rowNumber}</div>
|
||||||
<div className="faq-num pre">FAQ {row.totCnt - row.rowNumber}</div>
|
<div className="faq-title pre">{row.title}</div>
|
||||||
<div className="faq-title pre">{row.title}</div>
|
<div className="faq-day pre">{dayjs(row.regDt).format('YYYY.MM.DD')}</div>
|
||||||
<div className="faq-day pre">{dayjs(row.regDt).format('YYYY.MM.DD')}</div>
|
</div>
|
||||||
</div>
|
</li>
|
||||||
</li>
|
)
|
||||||
)
|
})}
|
||||||
})}
|
</ul>
|
||||||
</>
|
) : (
|
||||||
) : (
|
<div className="recently-no-data">
|
||||||
<MainSkeleton count={2} />
|
<h3>{getMessage('main.content.noBusiness')}</h3>
|
||||||
)}
|
</div>
|
||||||
</ul>
|
)}
|
||||||
</ProductItem>
|
</ProductItem>
|
||||||
<ProductItem num={4} name={'Data Download'}>
|
<ProductItem num={4} name={'Data Download'}>
|
||||||
<div className="data-download-wrap">
|
<div className="data-download-wrap">
|
||||||
<button
|
<button className="data-down" type="button" onClick={() => swalFire({ text: getMessage('main.content.alert.noFile'), type: 'alert' })}>
|
||||||
className="data-down"
|
|
||||||
type="button"
|
|
||||||
onClick={() => {
|
|
||||||
return alert(getMessage('main.content.alert.noFile'))
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<span>{getMessage('main.content.download1')}</span>
|
<span>{getMessage('main.content.download1')}</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button className="data-down" type="button" onClick={() => swalFire({ text: getMessage('main.content.alert.noFile'), type: 'alert' })}>
|
||||||
className="data-down"
|
|
||||||
type="button"
|
|
||||||
onClick={() => {
|
|
||||||
return alert(getMessage('main.content.alert.noFile'))
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<span>{getMessage('main.content.download2')}</span>
|
<span>{getMessage('main.content.download2')}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -207,6 +207,7 @@ header{
|
|||||||
.select-box{
|
.select-box{
|
||||||
min-width: 165px;
|
min-width: 165px;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
|
height: 30px;
|
||||||
>div{
|
>div{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -155,6 +155,7 @@
|
|||||||
.product-item-content{
|
.product-item-content{
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
height: 100%;
|
||||||
.recently-list{
|
.recently-list{
|
||||||
.recently-item{
|
.recently-item{
|
||||||
border: 1px solid #F2F2F2;
|
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{
|
.notice-box{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user