Skip to content

Commit

Permalink
udpate
Browse files Browse the repository at this point in the history
  • Loading branch information
alifnaufalyasin committed Oct 20, 2023
1 parent 91e3bb9 commit 637f4ef
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions pages/member.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ import {
import { motion } from "framer-motion";
import CardAnggota from "../components/CardAnggota"
import { NextSeo } from "next-seo";

export default async function member() {
const file = await fs.readFile(process.cwd() + '/data/dataMember.json', 'utf8');
const dataAnggota = JSON.parse(file);
const member = (props) => {
const { dataAnggota } = props
// const [dataAnggota, setDataAnggota] = React.useState(false);
const MotionBox = motion(Box)
const year = new Date().getFullYear()
Expand Down Expand Up @@ -112,3 +110,12 @@ export default async function member() {
);
}
};

member.getInitialProps = async () => {
const file = await fs.readFile(process.cwd() + '/data/dataMember.json', 'utf8');
const data = JSON.parse(file);
return {dataAnggota: data};

}

export default member;

0 comments on commit 637f4ef

Please sign in to comment.