mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: init payments config backend & dash frontend
This commit is contained in:
parent
96e453a4de
commit
deba63cc15
15 changed files with 774 additions and 14 deletions
62
apps/web/components/Objects/Menus/OrgMenu/OrgMenuLinks.tsx
Normal file
62
apps/web/components/Objects/Menus/OrgMenu/OrgMenuLinks.tsx
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
import AuthenticatedClientElement from '@components/Security/AuthenticatedClientElement'
|
||||
import { getUriWithOrg } from '@services/config/config'
|
||||
import { BookCopy, Signpost, SquareLibrary } from 'lucide-react'
|
||||
import Link from 'next/link'
|
||||
import React from 'react'
|
||||
|
||||
function MenuLinks(props: { orgslug: string }) {
|
||||
return (
|
||||
<div className='pl-1'>
|
||||
<ul className="flex space-x-5">
|
||||
<LinkItem
|
||||
link="/courses"
|
||||
type="courses"
|
||||
orgslug={props.orgslug}
|
||||
></LinkItem>
|
||||
<LinkItem
|
||||
link="/collections"
|
||||
type="collections"
|
||||
orgslug={props.orgslug}
|
||||
></LinkItem>
|
||||
<AuthenticatedClientElement checkMethod="authentication">
|
||||
<LinkItem
|
||||
link="/trail"
|
||||
type="trail"
|
||||
orgslug={props.orgslug}
|
||||
></LinkItem>
|
||||
</AuthenticatedClientElement>
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
const LinkItem = (props: any) => {
|
||||
const link = props.link
|
||||
const orgslug = props.orgslug
|
||||
return (
|
||||
<Link href={getUriWithOrg(orgslug, link)}>
|
||||
<li className="flex space-x-2 items-center text-[#909192] font-medium">
|
||||
{props.type == 'courses' && (
|
||||
<>
|
||||
<BookCopy size={20} />{' '}
|
||||
<span>Courses</span>
|
||||
</>
|
||||
)}
|
||||
|
||||
{props.type == 'collections' && (
|
||||
<>
|
||||
<SquareLibrary size={20} />{' '}
|
||||
<span>Collections</span>
|
||||
</>
|
||||
)}
|
||||
|
||||
{props.type == 'trail' && (
|
||||
<>
|
||||
<Signpost size={20} />{' '}
|
||||
<span>Trail</span>
|
||||
</>
|
||||
)}
|
||||
</li>
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
export default MenuLinks
|
||||
Loading…
Add table
Add a link
Reference in a new issue