made app store category grid flexible based on amount of categories (#2315)
* made app store category grid flexible based on amount of categories * Update yarn.lock Co-authored-by: zomars <[email protected]>
This commit is contained in:
1 parent
6b0e8db496
commit
ef97f4115d
4 files changed
+321
-53
No files matched your search
@@ -3,13 +3,20 @@ import Link from "next/link";
|
||||
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
|
||||
export default function AppStoreCategories(props: any) {
|
||||
export default function AppStoreCategories({
|
||||
categories,
|
||||
}: {
|
||||
categories: {
|
||||
name: string;
|
||||
count: number;
|
||||
}[];
|
||||
}) {
|
||||
const { t } = useLocale();
|
||||
return (
|
||||
<div className="mb-16">
|
||||
<h2 className="mb-2 text-lg font-semibold text-gray-900">{t("popular_categories")}</h2>
|
||||
<div className="grid grid-cols-1 gap-3 md:grid-cols-3">
|
||||
{props.categories.map((category: any) => (
|
||||
<div className="grid-col-1 grid gap-3 md:grid-flow-col">
|
||||
{categories.map((category) => (
|
||||
<Link key={category.name} href={"/apps/categories/" + category.name}>
|
||||
<a className="relative flex rounded-sm bg-gray-100 px-6 py-4 sm:block">
|
||||
<div className="min-w-24 -ml-5 text-center sm:ml-0">
|
||||
|
||||
@@ -5,7 +5,6 @@ import { useRouter } from "next/router";
|
||||
|
||||
import { getAppRegistry } from "@calcom/app-store/_appRegistry";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import Button from "@calcom/ui/Button";
|
||||
|
||||
import Shell from "@components/Shell";
|
||||
import AppCard from "@components/apps/AppCard";
|
||||
|
||||
Reference in new issue
Block a user