init project
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
import { Link, useParams } from 'react-router-dom'
|
||||
import { getCiMeta } from '../lib/ciRouteLookup'
|
||||
|
||||
/** Fallback for CI-style paths not yet ported to dedicated React pages. */
|
||||
export function CiPlaceholderPage() {
|
||||
const params = useParams()
|
||||
const star = params['*'] ?? ''
|
||||
const segments = star.split('/').filter(Boolean)
|
||||
const meta = getCiMeta(star)
|
||||
|
||||
const title = meta?.title ?? 'Section placeholder'
|
||||
const viewsPath = meta?.ciViewPath ?? (star ? `…/${star}` : '…')
|
||||
|
||||
return (
|
||||
<div>
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol className="breadcrumb">
|
||||
<li className="breadcrumb-item">
|
||||
<Link to="/app/home">Home</Link>
|
||||
</li>
|
||||
{segments.map((s, i) => (
|
||||
<li
|
||||
key={`${s}-${i}`}
|
||||
className={`breadcrumb-item ${i === segments.length - 1 ? 'active' : ''}`}
|
||||
aria-current={i === segments.length - 1 ? 'page' : undefined}
|
||||
>
|
||||
{s}
|
||||
</li>
|
||||
))}
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<h2 className="h4 mb-3">{title}</h2>
|
||||
<p className="text-muted mb-2">
|
||||
CodeIgniter view:{' '}
|
||||
<code>
|
||||
app/Views/{viewsPath}
|
||||
</code>
|
||||
</p>
|
||||
<p className="text-muted small mb-3">
|
||||
Implement this screen using the matching routes in <code>app_laravel/routes/api.php</code>{' '}
|
||||
(JWT <code>Authorization: Bearer</code>). See also <Link to="/docs">API docs</Link>.
|
||||
</p>
|
||||
<p className="small mb-3">
|
||||
SPA path: <code>/app/{star || '…'}</code>
|
||||
</p>
|
||||
<p className="small mb-0">
|
||||
<Link to="/app/browse">Browse all CI view routes</Link>
|
||||
{' · '}
|
||||
<Link to="/app/home">App home</Link>
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user