1
0
mirror of https://github.com/uetchy/namae.git synced 2025-08-20 18:08:11 +09:00

feat: refine footer

This commit is contained in:
2020-07-30 13:47:28 +09:00
parent 04725d0a65
commit 0d632a8eb2
7 changed files with 387 additions and 244 deletions

View File

@@ -1,4 +1,5 @@
import { useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import { Helmet } from 'react-helmet';
export function useDeferredState<T>(
duration = 1000,
@@ -19,3 +20,16 @@ export function useDeferredState<T>(
return [response, setInnerValue];
}
export function useOpenSearch(xmlPath: string) {
return () => (
<Helmet>
<link
rel="search"
type="application/opensearchdescription+xml"
title="namae"
href={xmlPath}
/>
</Helmet>
);
}