Field Name | Type | Description | Requirement | Properties | Format |
---|---|---|---|---|---|
title | Text | article title | Required = true | single line | - |
body | Text | article content | Required = true | multiline | - |
timestamp | datetime | Time the article was saved | Required = true | - | MM DD hh:m |
tags | Text | technologies used in the article | Required = false | single line | - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import path from "path"; | |
import { promises as fs } from "fs"; | |
import process from "process"; | |
import dotenv from "dotenv"; | |
import { google, Auth } from "googleapis"; | |
import { authenticate } from "@google-cloud/local-auth"; | |
dotenv.config(); | |
const SCOPES = ["https://www.googleapis.com/auth/calendar.readonly"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const readline = require("readline").createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
}); | |
const fib = (num) => { | |
const fibs = []; | |
for (let i = 0; i < num; i++) { | |
if (i <= 1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"category": "Web Development", | |
"keywords": [ | |
["Chief Technology Officer"], | |
["CTO"], | |
["R&D"], | |
["Architect"], | |
["Database", "Administrator"], | |
["Information", "Technology"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return ( | |
<BrowserRouter> | |
<Switch> | |
<Route exact path="/" component={Homepage} /> | |
<Route exact path="/anime/:name" component={Animepage} /> | |
</Switch> | |
</BrowserRouter> | |
); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const App = () => { | |
const setTitles = useSetRecoilState(animeTitles); | |
const fetchAnimes = async () => { | |
try { | |
const res = await axios.get( | |
"https://animechan.vercel.app/api/available/anime" | |
); | |
setTitles(res?.data); | |
} catch (error) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect } from "react"; | |
import { BrowserRouter, Route, Switch } from "react-router-dom"; | |
import { useSetRecoilState } from "recoil"; | |
import axios from "axios"; | |
import { animeTitles } from "./store"; | |
import Homepage from "./pages/home"; | |
import Animepage from "./pages/anime"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from "react"; | |
import { Link, useParams } from "react-router-dom"; | |
import axios from "axios"; | |
import styled from "styled-components"; | |
import SmallQuote from "../../components/SmallQuote/SmallQuote"; | |
const Animepage = () => { | |
const param = useParams(); | |
const [quotes, setQuotes] = useState([]); | |
const [loading, setLoading] = useState(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useRecoilValue } from "recoil"; | |
import styled from "styled-components"; | |
import AnimePill from "../../components/AnimePill/AnimePill"; | |
import Pagination from "../../components/Pagination/Pagination"; | |
import Quote from "../../components/Quote/Quote"; | |
import { slicedAnimeTitles, animeTitles } from "../../store"; | |
const Homepage = () => { | |
const animes = useRecoilValue(animeTitles); | |
const slicedAnimes = useRecoilValue(slicedAnimeTitles); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const StyledPagination = styled.div` | |
display: flex; | |
align-items: center; | |
border-width: 2px 2px 2px 0; | |
border-style: solid; | |
width: max-content; | |
& button { | |
outline: none; | |
background: transparent; | |
border: none; |
NewerOlder