diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bf964e9f..e349f99d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,8 +2,6 @@ name: Build and Deploy on: push: branches: [master] - schedule: - - cron: '0 19 * * *' jobs: build-and-deploy: @@ -15,6 +13,9 @@ jobs: - uses: actions/checkout@v2.3.1 with: persist-credentials: false + - uses: actions/setup-node@v3 + with: + node-version: 14.21.1 - name: Install 🔧 run: yarn install diff --git a/pages/member.jsx b/pages/member.jsx deleted file mode 100644 index d0a9854d..00000000 --- a/pages/member.jsx +++ /dev/null @@ -1,149 +0,0 @@ -import React from "react"; -import Axios from "axios"; -import { - Box, - Heading, - useColorModeValue, - useColorMode, - Spinner, - Skeleton -} from "@chakra-ui/react"; -import { motion } from "framer-motion"; -import Link from "../components/Link"; -import CardAnggota from "../components/CardAnggota" -import aslab21 from "../data/aslab21"; -import aslab20 from "../data/aslab20"; -import { NextSeo } from "next-seo"; -const member = (props) => { - const { dataAnggota } = props - // const [dataAnggota, setDataAnggota] = React.useState(false); - const MotionBox = motion(Box) - const { colorMode } = useColorMode(); - const bgColor = useColorModeValue("white", "gray.700"); - const year = new Date().getFullYear() - const itemVariant = { - start: { y: 20, opacity: 0 }, - end: { y: 0, opacity: 1 }, - }; - const containerVariant = { - start: { - y: 20, - opacity: 0, - transition: { staggerChildren: 0.25 }, - }, - end: { - y: 0, - opacity: 1, - transition: { staggerChildren: 0.25 }, - }, - exit: { opacity: 0, transition: { duration: 0.1 } }, - }; - // React.useEffect(() => { - // Axios.post( - // "https://botIgadis.aliven.my.id/getSheetAI", - // { - // id_spreadsheet: "1SaXnuRt-1KXyDGS18KqU7cus4_IWNxpGhiVy0J1vz-U", - // email: "sheet-access@web-amazing-ai.iam.gserviceaccount.com", - // sheet_title: "web" - // }) - // .then(response => { console.log(response.data); setDataAnggota(response.data.data)}) - // }, []) - - if (!dataAnggota) - return ( - - - - - - Member of Artificial Intelligence Laboratory Telkom University - - - - - - - ) - else{ - // console.log("dataAnggota",dataAnggota) - dataAnggota.sort(function (a, b) { - return b.angkatan_ai - a.angkatan_ai - }) - const tot = year - dataAnggota[dataAnggota.length - 1].angkatan_ai - let arrYear = [] - for (let i=0; i<=tot;i++){ - arrYear.push(year-i) - } - return ( - - - - - - Member of Artificial Intelligence Laboratory Telkom University - - {arrYear.map((tahun,idx)=>{ - const data = dataAnggota.filter(anggota => anggota.angkatan_ai == tahun) - if (data.length >0){ - return ( - - - {tahun} Generation - - - - ) - } - }) - } - - - - ); - } -}; - -member.getInitialProps = async () => { - try { - const res = await Axios.post( - "https://be-web-ai.herokuapp.com/getSheetAI", - { - id_spreadsheet: "1SaXnuRt-1KXyDGS18KqU7cus4_IWNxpGhiVy0J1vz-U", - email: "sheet-access@web-amazing-ai.iam.gserviceaccount.com", - sheet_title: "web" - } - ); - return {dataAnggota: res.data.data}; - } catch (err) { - console.log(err) - } -} - -export default member;