Add posts and old grade-calc

Fix small bugs
>bad commit
This commit is contained in:
2022-02-14 15:32:58 -05:00
parent 391fff28b1
commit bfacb23f8a
21 changed files with 1047 additions and 267 deletions

View File

@@ -1,6 +1,7 @@
import { ChangeEvent, useCallback, useEffect, useRef, useState } from 'react';
import Fuzzy from './_fuzzy';
import pages from '../public/pages.json';
import posts from '../public/posts.json';
import style from '../styles/fuzzy.module.css';
function FuzzyBar(): JSX.Element {
@@ -13,9 +14,15 @@ function FuzzyBar(): JSX.Element {
let fuzz: Fuzzy | null = null;
let entries = [...pages];
for (const [k,v] of posts.entries()) {
entries.push({title: v.title, link: `posts/${v.slug}`});
}
try {
fuzz = new Fuzzy({
pages: pages,
pages: entries,
searchField: searchField,
searchValue: searchValue,
resultsValue: resultsValue,

View File

@@ -1,5 +1,4 @@
import FuzzyBar from './fuzzy-bar';
import Logo from '../public/logo.svg';
import Meta from './meta';
import Title from './title';

View File

@@ -1,6 +1,5 @@
import style from '../styles/title.module.css';
import Link from 'next/link';
import { useEffect, useState } from 'react';
type propsObj = {
name: string,