Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
alifnaufalyasin committed Oct 20, 2023
1 parent 2fb289d commit 6852f93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
run: |
python ./scripts/script.py
cp ./scripts/dataMember.json ./data/dataMember.json
ls .
- name: Install 🔧
run: yarn install
Expand Down
12 changes: 3 additions & 9 deletions pages/member.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import {
import { motion } from "framer-motion";
import CardAnggota from "../components/CardAnggota"
import { NextSeo } from "next-seo";
const member = (props) => {
const { dataAnggota } = props
const member = async (props) => {
const file = await fs.readFile(process.cwd() + '/data/dataMember.json', 'utf8');
const dataAnggota = JSON.parse(file);
// const [dataAnggota, setDataAnggota] = React.useState(false);
const MotionBox = motion(Box)
const year = new Date().getFullYear()
Expand Down Expand Up @@ -111,11 +112,4 @@ const member = (props) => {
}
};

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 6852f93

Please sign in to comment.