workspaces_registry_template/site/components/App.js

30 lines
1.3 KiB
JavaScript
Raw Normal View History

import { useRouter } from 'next/router'
2022-12-14 15:03:50 +00:00
function App({ Component, pageProps, app }) {
const router = useRouter()
const viewexample = (app) => {
router.push({
pathname: '/addapp/[app]',
query: { app: btoa(app.name)}
})
}
2022-12-14 15:03:50 +00:00
return (
<div onClick={() => viewexample(app)} className="w-[245px] h-[88px] transition-all relative cursor-pointer group flex p-2 items-center justify-center bg-slate-100/90 dark:bg-slate-900/90 shadow rounded hover:shadow-xl hover:bg-gradient-to-r hover:from-slate-900 hover:to-cyan-800 hover:text-white">
2022-12-14 15:03:50 +00:00
<div className="w-full h-full">
<div className="show-grid flex h-full items-center">
<div className="kasmcard-img flex h-full mx-4 items-center justify-center">
<img className="w-[50px] max-h-[66px]" src={ 'icons/' + app.image_src} />
</div>
<div className="kasmcard-detail settingPad">
<h5 className="text-base">{ app.friendly_name }</h5>
2022-12-16 12:05:14 +00:00
<p className="text-xs opacity-50">{ app.categories && app.categories[0] || 'Unknown' }</p>
2022-12-14 15:03:50 +00:00
</div>
</div>
</div>
</div>
)
}
export default App