From 9044257b13209b1aa2235cd9f8f09e405992ce26 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Sirois Date: Fri, 7 Aug 2020 04:45:22 -0400 Subject: [PATCH] refact: rename 404 hint component --- .../{404LinkCorrection => FourZeroFourHint}/index.tsx | 4 ++-- .../{404LinkCorrection => FourZeroFourHint}/styles.tsx | 0 src/pages/archives/404.tsx | 4 ++-- src/pages/resources/404.tsx | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) rename src/components/{404LinkCorrection => FourZeroFourHint}/index.tsx (97%) rename src/components/{404LinkCorrection => FourZeroFourHint}/styles.tsx (100%) diff --git a/src/components/404LinkCorrection/index.tsx b/src/components/FourZeroFourHint/index.tsx similarity index 97% rename from src/components/404LinkCorrection/index.tsx rename to src/components/FourZeroFourHint/index.tsx index a93c146..35c0ff7 100644 --- a/src/components/404LinkCorrection/index.tsx +++ b/src/components/FourZeroFourHint/index.tsx @@ -55,14 +55,14 @@ function levenshteinDistance(term1: string, term2: string) { return matrix[term2.length][term1.length] } -interface IPossibleCorrections { +interface IFourZeroFourHint { basepath: string location: WindowLocation data: { allFile: FileConnection } threshold?: number } -export const PossibleCorrections: FC = ({ +export const FourZeroFourHint: FC = ({ basepath, location, data, diff --git a/src/components/404LinkCorrection/styles.tsx b/src/components/FourZeroFourHint/styles.tsx similarity index 100% rename from src/components/404LinkCorrection/styles.tsx rename to src/components/FourZeroFourHint/styles.tsx diff --git a/src/pages/archives/404.tsx b/src/pages/archives/404.tsx index 9cc24c3..bea9bc2 100644 --- a/src/pages/archives/404.tsx +++ b/src/pages/archives/404.tsx @@ -6,7 +6,7 @@ import { FileConnection } from "../../../generated/graphql" import { ComponentQuery } from "../../../typings" import { SEO } from "../../components/SEO" -import { PossibleCorrections } from "../../components/404LinkCorrection" +import { FourZeroFourHint } from "../../components/FourZeroFourHint" import { FourZeroFour } from "../../components/FourZeroFour" export default ({ data }: ComponentQuery<{ allFile: FileConnection }>) => ( @@ -15,7 +15,7 @@ export default ({ data }: ComponentQuery<{ allFile: FileConnection }>) => ( {({ location }) => ( - ) => ( {({ location }) => ( -