mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-30 00:29:46 +08:00
chore: rename notFound
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import NoResult from './not-found';
|
||||
import NotFound from './not-found';
|
||||
import { Command } from 'cmdk';
|
||||
import { PageMeta, useEditor } from '@/providers/editor-provider';
|
||||
|
||||
@@ -35,7 +35,10 @@ const SearchResult = (props: { query: string }) => {
|
||||
}
|
||||
});
|
||||
return (
|
||||
<>{resultsPageMeta.length ? renderPages(resultsPageMeta) : <NoResult />}</>
|
||||
<>
|
||||
{renderPages(resultsPageMeta)}
|
||||
{resultsPageMeta.length ? <></> : <NotFound />}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React from 'react';
|
||||
import { Command, useCommandState } from 'cmdk';
|
||||
|
||||
const NoResult = () => {
|
||||
const NotFound = () => {
|
||||
const search = useCommandState(state => state.search);
|
||||
// eslint-disable-next-line react/no-unescaped-entities
|
||||
return <Command.Empty>No results found for "{search}".</Command.Empty>;
|
||||
};
|
||||
|
||||
export default NoResult;
|
||||
export default NotFound;
|
||||
|
||||
Reference in New Issue
Block a user