feat: page holder
parent
2c4239c593
commit
d6fe22b19e
@ -0,0 +1,26 @@
|
|||||||
|
'use client'
|
||||||
|
import type { FC } from 'react'
|
||||||
|
import React from 'react'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
|
const i18nPrefix = 'app.checkLegacy'
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
appNum: number,
|
||||||
|
publishedNum: number,
|
||||||
|
}
|
||||||
|
|
||||||
|
const Header: FC<Props> = ({
|
||||||
|
appNum,
|
||||||
|
publishedNum,
|
||||||
|
}) => {
|
||||||
|
const { t } = useTranslation()
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<div className='title-2xl-semi-bold text-text-primary'>{t(`${i18nPrefix}.title`)}</div>
|
||||||
|
<div className='system-md-regular mt-1 text-text-tertiary'>{t(`${i18nPrefix}.description`, { num: appNum, publishedNum })}</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default React.memo(Header)
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
'use client'
|
||||||
|
import type { FC } from 'react'
|
||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
list: any[]
|
||||||
|
}
|
||||||
|
|
||||||
|
const List: FC<Props> = ({
|
||||||
|
list,
|
||||||
|
}) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{list.length > 0 ? (
|
||||||
|
<ul className='list-disc pl-5'>
|
||||||
|
{list.map((item, index) => (
|
||||||
|
<li key={index} className='system-md-regular text-text-primary'>
|
||||||
|
{item}
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
) : (
|
||||||
|
<div className='system-md-regular text-text-secondary'>No items found</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
export default React.memo(List)
|
||||||
@ -1,7 +1,17 @@
|
|||||||
|
'use client'
|
||||||
|
import Header from './components/header'
|
||||||
|
// TODO: Filter
|
||||||
|
import List from './components/list'
|
||||||
|
|
||||||
const Page = () => {
|
const Page = () => {
|
||||||
return (<>
|
return (
|
||||||
<div>Check legacy page</div>
|
<div>
|
||||||
</>)
|
<Header appNum={5} publishedNum={3}/>
|
||||||
|
<div>
|
||||||
|
<List list={[]} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Page
|
export default Page
|
||||||
|
|||||||
Loading…
Reference in New Issue