Alex the Emperor Penguin 3 years ago
parent caee755802
commit 1001e5c8d3

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="DiscordProjectSettings"> <component name="DiscordProjectSettings">
<option name="show" value="ASK" /> <option name="show" value="PROJECT_FILES" />
<option name="description" value="" /> <option name="description" value="" />
</component> </component>
</project> </project>

@ -1,6 +1,13 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
reactStrictMode: true, reactStrictMode: true,
webpack: (config) => {
config.experiments = {
topLevelAwait: true,
layers: true,
}
return config
},
} }
module.exports = nextConfig module.exports = nextConfig

11
package-lock.json generated

@ -9,6 +9,7 @@
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"next": "13.0.1", "next": "13.0.1",
"pocketbase": "^0.7.4",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0" "react-dom": "18.2.0"
} }
@ -325,6 +326,11 @@
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" "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": { "node_modules/postcss": {
"version": "8.4.14", "version": "8.4.14",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", "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", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" "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": { "postcss": {
"version": "8.4.14", "version": "8.4.14",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",

@ -10,6 +10,7 @@
}, },
"dependencies": { "dependencies": {
"next": "13.0.1", "next": "13.0.1",
"pocketbase": "^0.7.4",
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0" "react-dom": "18.2.0"
} }

@ -1,21 +1,48 @@
import Head from 'next/head' import Head from 'next/head'
import Image from 'next/image' import Image from 'next/image'
import PocketBase from 'pocketbase'
import styles from '../styles/Home.module.css' 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() { export default function Home() {
return ( return (
<div className={styles.container}> <div className={styles.container}>
<Head> <Head>
<title>Create Next App</title> <title>hihi</title>
<meta name="description" content="Generated by create next app" /> <meta name="description" content="Generated by create next app" />
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
</Head> </Head>
{/*{console.log(adminAuthData)}*/}
<div>
{resultList.items.map((item, i) => (
<div key={i}>
// Show all things which you want
<br/>
{i}
<br/>
{item.title}
<br/>
{i}
<br/>
{item.description}
</div>
))
}
</div>
<main className={styles.main}> <main className={styles.main}>
<h1 className={styles.title}> <h1 className={styles.title}>
Welcome to <a href="https://nextjs.org">Next.js!</a> Welcome to <a href="https://nextjs.org">kakapoopoo.js!</a>
<br/>
</h1> </h1>
<p className={styles.description}> <p className={styles.description}>
Get started by editing{' '} Get started by editing{' '}
<code className={styles.code}>pages/index.js</code> <code className={styles.code}>pages/index.js</code>

Loading…
Cancel
Save