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:
@@ -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>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user