File size: 587 Bytes
b10df03
 
92c8d86
e5f9c03
b10df03
 
 
 
 
 
 
 
e5f9c03
b10df03
 
 
 
92c8d86
 
e5f9c03
b10df03
e5f9c03
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { fetchAllPages } from "@/utils";
import { SpaceProps } from "@/utils/type";
import { Spaces } from "@/components/spaces";

async function getSpaces() {
  try {
    const response = await fetchAllPages();
    return response as SpaceProps[];
  } catch {
    return [];
  }
}

export default async function Home() {
  const spaces = await getSpaces();
  return (
    <section className="flex h-screen overflow-auto">
      <div className="w-full container px-6 py-10 lg:py-20 mx-auto space-y-10 lg:space-y-14">
        <Spaces spaces={spaces} />
      </div>
    </section>
  );
}