EetJeKomu
EetJeKomu
KPCKevin Powell - Community
Created by EetJeKomu on 12/12/2023 in #front-end
Trying to use getStaticProps in a layout.js
No description
23 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/12/2023 in #front-end
Trying to use getStaticProps in a layout.js
Thanks alot!
23 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/12/2023 in #front-end
Trying to use getStaticProps in a layout.js
i'm in voice
23 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/12/2023 in #front-end
Trying to use getStaticProps in a layout.js
it is a little
23 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/12/2023 in #front-end
Trying to use getStaticProps in a layout.js
So you mean I should only place "use client" in the component its needed?
23 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/12/2023 in #front-end
Trying to use getStaticProps in a layout.js
its needed in the component for the usePathName I think
23 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/12/2023 in #front-end
Trying to use getStaticProps in a layout.js
"use client";
import React from "react";
import Link from "next/link";
import { usePathname } from "next/navigation";
import styles from "./DashboardLink.module.scss";
import Image from "next/image";

export default function DashboardLink({ children, link, icon }) {
const pathname = usePathname();

"use client";
import React from "react";
import Link from "next/link";
import { usePathname } from "next/navigation";
import styles from "./DashboardLink.module.scss";
import Image from "next/image";

export default function DashboardLink({ children, link, icon }) {
const pathname = usePathname();

23 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/12/2023 in #front-end
Trying to use getStaticProps in a layout.js
yes I get this
ReactServerComponentsError:

You're importing a component that needs useState. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.
Learn more: https://nextjs.org/docs/getting-started/react-essentials
ReactServerComponentsError:

You're importing a component that needs useState. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.
Learn more: https://nextjs.org/docs/getting-started/react-essentials
23 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/12/2023 in #front-end
Trying to use getStaticProps in a layout.js
this is the whole error
23 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/12/2023 in #front-end
Trying to use getStaticProps in a layout.js
ReactServerComponentsError:

"getStaticProps" is not supported in app/. Read more: https://nextjs.org/docs/app/building-your-application/data-fetching

╭─[C:\Users\runel\Documents\Odisee\Fase3\ATP\2324_atp_routeyou_1_frontend\src\app\dashboard\my-events\page.js:27:1]
27 │ import { createdEvents } from "@/services/EventService";
28 │ import { jsx as _jsx } from "react/jsx-runtime";
29 │ import { jsxs as _jsxs } from "react/jsx-runtime";
30 │ export function getStaticProps() {
· ──────────────
31 │ return _getStaticProps.apply(this, arguments);
32 │ }
╰────

File path:
./src\app\dashboard\my-events\page.js
ReactServerComponentsError:

"getStaticProps" is not supported in app/. Read more: https://nextjs.org/docs/app/building-your-application/data-fetching

╭─[C:\Users\runel\Documents\Odisee\Fase3\ATP\2324_atp_routeyou_1_frontend\src\app\dashboard\my-events\page.js:27:1]
27 │ import { createdEvents } from "@/services/EventService";
28 │ import { jsx as _jsx } from "react/jsx-runtime";
29 │ import { jsxs as _jsxs } from "react/jsx-runtime";
30 │ export function getStaticProps() {
· ──────────────
31 │ return _getStaticProps.apply(this, arguments);
32 │ }
╰────

File path:
./src\app\dashboard\my-events\page.js
23 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/12/2023 in #front-end
Trying to use getStaticProps in a layout.js
atleast I think its because of a component
23 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/12/2023 in #front-end
Trying to use getStaticProps in a layout.js
Yes I do
23 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/12/2023 in #front-end
Trying to use getStaticProps in a layout.js
I think because a component from page that needs it to be client
23 replies
KPCKevin Powell - Community
Created by EetJeKomu on 4/11/2023 in #os-and-tools
Files lost in commit to "no branch"
Did something like that and it was solved thanks!
4 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/1/2022 in #back-end
SQL foreign key constraint fails
Thanks maat!
14 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/1/2022 in #back-end
SQL foreign key constraint fails
Thanks for the help
14 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/1/2022 in #back-end
SQL foreign key constraint fails
I've already noticed it make some small errors sometimes and this is one of them
14 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/1/2022 in #back-end
SQL foreign key constraint fails
We used mySQLworkbench to generate the .sql from a model
14 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/1/2022 in #back-end
SQL foreign key constraint fails
I'm looking into it
14 replies
KPCKevin Powell - Community
Created by EetJeKomu on 12/1/2022 in #back-end
SQL foreign key constraint fails
Ooh really, it could be possible that that is the problem
14 replies