enzostvs HF Staff commited on
Commit
290d608
·
1 Parent(s): 4c9a7ca
components/my-projects/index.tsx CHANGED
@@ -2,17 +2,16 @@
2
  import { Plus } from "lucide-react";
3
  import Link from "next/link";
4
  import { useState } from "react";
 
5
 
6
  import { useUser } from "@/hooks/useUser";
7
- import { Project, ProjectType } from "@/types";
8
  import { ProjectCard } from "./project-card";
9
- import { LoadProject } from "./load-project";
10
  import { MAX_FREE_PROJECTS } from "@/lib/utils";
11
  import { ProTag } from "@/components/pro-modal";
12
  import { Button } from "@/components/ui/button";
13
  import { useProModal } from "@/components/contexts/pro-context";
14
  import { api } from "@/lib/api";
15
- import { toast } from "sonner";
16
 
17
  export function MyProjects({
18
  projects: initialProjects,
@@ -71,12 +70,6 @@ export function MyProjects({
71
  Upgrade to PRO
72
  </Button>
73
  ) : (
74
- // <LoadProject
75
- // fullXsBtn
76
- // onSuccess={(project: ProjectType) => {
77
- // setProjects((prev) => [...prev, project]);
78
- // }}
79
- // />
80
  <div></div>
81
  )}
82
  </header>
@@ -84,14 +77,14 @@ export function MyProjects({
84
  {projects.length < MAX_FREE_PROJECTS || user?.isPro ? (
85
  <Link
86
  href="/projects/new"
87
- className="bg-neutral-900 rounded-xl h-44 flex items-center justify-center text-neutral-300 border border-neutral-800 hover:brightness-110 transition-all duration-200"
88
  >
89
  <Plus className="size-5 mr-1.5" />
90
  Create Project
91
  </Link>
92
  ) : (
93
  <div
94
- className="bg-neutral-900 rounded-xl h-44 flex items-center justify-center text-neutral-300 border border-neutral-800 hover:brightness-110 transition-all duration-200 cursor-pointer"
95
  onClick={() => openProModal([])}
96
  >
97
  <Plus className="size-5 mr-1.5" />
 
2
  import { Plus } from "lucide-react";
3
  import Link from "next/link";
4
  import { useState } from "react";
5
+ import { toast } from "sonner";
6
 
7
  import { useUser } from "@/hooks/useUser";
8
+ import { ProjectType } from "@/types";
9
  import { ProjectCard } from "./project-card";
 
10
  import { MAX_FREE_PROJECTS } from "@/lib/utils";
11
  import { ProTag } from "@/components/pro-modal";
12
  import { Button } from "@/components/ui/button";
13
  import { useProModal } from "@/components/contexts/pro-context";
14
  import { api } from "@/lib/api";
 
15
 
16
  export function MyProjects({
17
  projects: initialProjects,
 
70
  Upgrade to PRO
71
  </Button>
72
  ) : (
 
 
 
 
 
 
73
  <div></div>
74
  )}
75
  </header>
 
77
  {projects.length < MAX_FREE_PROJECTS || user?.isPro ? (
78
  <Link
79
  href="/projects/new"
80
+ className="bg-neutral-900 rounded-xl h-64 lg:h-44 flex items-center justify-center text-neutral-300 border border-neutral-800 hover:brightness-110 transition-all duration-200"
81
  >
82
  <Plus className="size-5 mr-1.5" />
83
  Create Project
84
  </Link>
85
  ) : (
86
  <div
87
+ className="bg-neutral-900 rounded-xl h-64 lg:h-44 flex items-center justify-center text-neutral-300 border border-neutral-800 hover:brightness-110 transition-all duration-200 cursor-pointer"
88
  onClick={() => openProModal([])}
89
  >
90
  <Plus className="size-5 mr-1.5" />
components/my-projects/project-card.tsx CHANGED
@@ -42,12 +42,18 @@ export function ProjectCard({
42
  <div className="text-neutral-200 space-y-4 group cursor-pointer">
43
  <Link
44
  href={`/projects/${project.name}`}
45
- className="relative bg-neutral-900 rounded-2xl overflow-hidden h-44 w-full flex items-center justify-end flex-col px-3 border border-neutral-800"
46
  >
47
- <iframe
48
- src={`/api/proxy/?spaceId=${encodeURIComponent(project.name)}`}
49
- className="absolute inset-0 w-full h-full top-0 left-0"
50
- />
 
 
 
 
 
 
51
 
52
  <Button
53
  variant="default"
 
42
  <div className="text-neutral-200 space-y-4 group cursor-pointer">
43
  <Link
44
  href={`/projects/${project.name}`}
45
+ className="relative bg-neutral-900 rounded-2xl overflow-hidden h-64 lg:h-44 w-full flex items-center justify-end flex-col px-3 border border-neutral-800"
46
  >
47
+ <div className="absolute inset-0 w-full h-full overflow-hidden">
48
+ <iframe
49
+ src={`/api/proxy/?spaceId=${encodeURIComponent(project.name)}`}
50
+ className="w-[1200px] h-[675px] border-0 origin-top-left"
51
+ style={{
52
+ transform: "scale(0.5)",
53
+ transformOrigin: "top left",
54
+ }}
55
+ />
56
+ </div>
57
 
58
  <Button
59
  variant="default"