2023-10-24 17:59:00 +00:00
|
|
|
import React from "react";
|
|
|
|
import HomepageComponent from "./(components)/HomepageComponent";
|
|
|
|
|
|
|
|
const datasquirel = require("datasquirel");
|
|
|
|
|
2024-01-01 06:53:36 +00:00
|
|
|
// export const revalidate = 3600;
|
2023-10-24 17:59:00 +00:00
|
|
|
|
|
|
|
type DsqlResponse = {
|
|
|
|
success: boolean;
|
|
|
|
payload: any;
|
|
|
|
};
|
|
|
|
|
|
|
|
export default async function Homepage() {
|
|
|
|
const projects: DsqlResponse = await datasquirel.get({
|
|
|
|
db: process.env.DB_NAME,
|
|
|
|
key: process.env.DATASQUIREL_API_KEY,
|
|
|
|
query: "SELECT * FROM portfolio ORDER BY project_order ASC",
|
|
|
|
});
|
|
|
|
|
2024-05-04 06:44:52 +00:00
|
|
|
return (
|
|
|
|
<React.Fragment>
|
|
|
|
<HomepageComponent projects={projects.payload} />
|
|
|
|
</React.Fragment>
|
|
|
|
);
|
2023-10-24 17:59:00 +00:00
|
|
|
}
|