mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 09:15:58 +02:00
refact: rename 404 hint component
This commit is contained in:
+2
-2
@@ -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<IPossibleCorrections> = ({
|
||||
export const FourZeroFourHint: FC<IFourZeroFourHint> = ({
|
||||
basepath,
|
||||
location,
|
||||
data,
|
||||
@@ -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 }>) => (
|
||||
<FourZeroFour title="ARCHIVE NOT FOUND">
|
||||
<Location>
|
||||
{({ location }) => (
|
||||
<PossibleCorrections
|
||||
<FourZeroFourHint
|
||||
basepath="archives/"
|
||||
location={location}
|
||||
data={data}
|
||||
|
||||
@@ -4,7 +4,7 @@ import React, { Fragment } from "react"
|
||||
|
||||
import { FileConnection } from "../../../generated/graphql"
|
||||
import { ComponentQuery } from "../../../typings"
|
||||
import { PossibleCorrections } from "../../components/404LinkCorrection"
|
||||
import { FourZeroFourHint } from "../../components/FourZeroFourHint"
|
||||
import { SEO } from "../../components/SEO"
|
||||
import { FourZeroFour } from "../../components/FourZeroFour"
|
||||
|
||||
@@ -14,7 +14,7 @@ export default ({ data }: ComponentQuery<{ allFile: FileConnection }>) => (
|
||||
<FourZeroFour title="RESOURCE NOT FOUND">
|
||||
<Location>
|
||||
{({ location }) => (
|
||||
<PossibleCorrections
|
||||
<FourZeroFourHint
|
||||
basepath="resources/"
|
||||
location={location}
|
||||
data={data}
|
||||
|
||||
Reference in New Issue
Block a user