mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add watermark
This commit is contained in:
parent
28a2456d69
commit
1bf58efe1c
3 changed files with 29 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
|||
import '@styles/globals.css'
|
||||
import { Menu } from '@components/Objects/Menu/Menu'
|
||||
import { SessionProvider } from 'next-auth/react'
|
||||
import Watermark from '@components/Watermark'
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
|
|
@ -15,6 +16,7 @@ export default function RootLayout({
|
|||
<SessionProvider>
|
||||
<Menu orgslug={params?.orgslug}></Menu>
|
||||
{children}
|
||||
<Watermark />
|
||||
</SessionProvider>
|
||||
</>
|
||||
)
|
||||
|
|
|
|||
27
apps/web/components/Watermark.tsx
Normal file
27
apps/web/components/Watermark.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import blacklogo from '@public/black_logo.png'
|
||||
import React, { useEffect } from 'react'
|
||||
import { useOrg } from './Contexts/OrgContext'
|
||||
|
||||
function Watermark() {
|
||||
const org = useOrg() as any
|
||||
|
||||
useEffect(() => {
|
||||
}
|
||||
, [org]);
|
||||
|
||||
if (org?.config?.config?.general?.watermark) {
|
||||
return (
|
||||
<div className='fixed bottom-8 right-8'>
|
||||
<Link href={`https://www.learnhouse.app/?source=in-app`} className="flex items-center cursor-pointer bg-white/80 backdrop-blur-lg text-gray-700 rounded-2xl p-2 light-shadow text-xs px-5 font-semibold space-x-2">
|
||||
<p>Made with</p>
|
||||
<Image unoptimized src={blacklogo} alt="logo" quality={100} width={85} />
|
||||
</Link>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
export default Watermark
|
||||
BIN
apps/web/public/black_logo.png
Normal file
BIN
apps/web/public/black_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
Loading…
Add table
Add a link
Reference in a new issue