diff --git a/.idea/discord.xml b/.idea/discord.xml
index 30bab2a..d8e9561 100644
--- a/.idea/discord.xml
+++ b/.idea/discord.xml
@@ -1,7 +1,7 @@
-
+
\ No newline at end of file
diff --git a/next.config.js b/next.config.js
index a843cbe..bdc2bac 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,6 +1,13 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
+ webpack: (config) => {
+ config.experiments = {
+ topLevelAwait: true,
+ layers: true,
+ }
+ return config
+ },
}
module.exports = nextConfig
diff --git a/package-lock.json b/package-lock.json
index 467f3b4..3154f02 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,6 +9,7 @@
"version": "0.1.0",
"dependencies": {
"next": "13.0.1",
+ "pocketbase": "^0.7.4",
"react": "18.2.0",
"react-dom": "18.2.0"
}
@@ -325,6 +326,11 @@
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
},
+ "node_modules/pocketbase": {
+ "version": "0.7.4",
+ "resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.7.4.tgz",
+ "integrity": "sha512-PvBRi4hbgbiBwDjhHa9lGD/ala8dSTjKeNAsHAgsXdIo4v9RgCk2s3Zqd/4UXVBgTJHVM6F7fGOZPvvJfSNVLQ=="
+ },
"node_modules/postcss": {
"version": "8.4.14",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
@@ -574,6 +580,11 @@
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
},
+ "pocketbase": {
+ "version": "0.7.4",
+ "resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.7.4.tgz",
+ "integrity": "sha512-PvBRi4hbgbiBwDjhHa9lGD/ala8dSTjKeNAsHAgsXdIo4v9RgCk2s3Zqd/4UXVBgTJHVM6F7fGOZPvvJfSNVLQ=="
+ },
"postcss": {
"version": "8.4.14",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
diff --git a/package.json b/package.json
index bf6e8e4..f427909 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,7 @@
},
"dependencies": {
"next": "13.0.1",
+ "pocketbase": "^0.7.4",
"react": "18.2.0",
"react-dom": "18.2.0"
}
diff --git a/pages/index.js b/pages/index.js
index 5bf5574..43a65a1 100644
--- a/pages/index.js
+++ b/pages/index.js
@@ -1,21 +1,48 @@
import Head from 'next/head'
import Image from 'next/image'
+import PocketBase from 'pocketbase'
import styles from '../styles/Home.module.css'
+console.log("username:" + process.env.USERNAME);
+
+const client = new PocketBase('https://backend.saachen.lu');
+const adminAuthData = await client.admins.authViaEmail(process.env.USERNAME, process.env.PASSWORD).catch((error) =>{console.log("It be a feature")});
+//console.log(adminAuthData);
+const resultList = await client.records.getList('forums', 1, 50, {
+ filter: 'created >= "2022-01-01 00:00:00"',
+});
+//console.log(resultList);
+
export default function Home() {
return (
-
Create Next App
+
hihi
-
+ {/*{console.log(adminAuthData)}*/}
+
+ {resultList.items.map((item, i) => (
+
+ // Show all things which you want
+
+ {i}
+
+ {item.title}
+
+ {i}
+
+ {item.description}
+
+ ))
+ }
+
-
Get started by editing{' '}
pages/index.js