mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-22 12:32:00 +08:00
chore: rename variable
This commit is contained in:
@@ -3,9 +3,9 @@ import JumpTo from './JumpTo';
|
|||||||
import { Command } from 'cmdk';
|
import { Command } from 'cmdk';
|
||||||
import SearchResult from './searchResult';
|
import SearchResult from './searchResult';
|
||||||
|
|
||||||
const Result = (props: { search: string }) => {
|
const Result = (props: { result: string }) => {
|
||||||
return (
|
return (
|
||||||
<Command.List>{props.search ? <SearchResult /> : <JumpTo />}</Command.List>
|
<Command.List>{props.result ? <SearchResult /> : <JumpTo />}</Command.List>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import NoResult from './NotFound';
|
import NoResult from './NotFound';
|
||||||
import { Command } from 'cmdk';
|
import { Command } from 'cmdk';
|
||||||
import Store from '@blocksuite/store';
|
|
||||||
|
|
||||||
const SearchResult = () => {
|
const SearchResult = () => {
|
||||||
return (
|
return (
|
||||||
@@ -10,7 +9,6 @@ const SearchResult = () => {
|
|||||||
<Command.Group heading="Letters">
|
<Command.Group heading="Letters">
|
||||||
<Command.Item>a</Command.Item>
|
<Command.Item>a</Command.Item>
|
||||||
<Command.Item>b</Command.Item>
|
<Command.Item>b</Command.Item>
|
||||||
<Command.Separator />
|
|
||||||
<Command.Item>c</Command.Item>
|
<Command.Item>c</Command.Item>
|
||||||
</Command.Group>
|
</Command.Group>
|
||||||
<Command.Item>Apple</Command.Item>
|
<Command.Item>Apple</Command.Item>
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import { MiddleSearchIcon } from '@blocksuite/icons';
|
|||||||
import { StyledInputContent, StyledLabel } from './style';
|
import { StyledInputContent, StyledLabel } from './style';
|
||||||
import { Command } from 'cmdk';
|
import { Command } from 'cmdk';
|
||||||
const Input = (props: {
|
const Input = (props: {
|
||||||
search: string;
|
query: string;
|
||||||
setSearch: Dispatch<SetStateAction<string>>;
|
setQuery: Dispatch<SetStateAction<string>>;
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<StyledInputContent>
|
<StyledInputContent>
|
||||||
@@ -12,8 +12,8 @@ const Input = (props: {
|
|||||||
<MiddleSearchIcon />
|
<MiddleSearchIcon />
|
||||||
</StyledLabel>
|
</StyledLabel>
|
||||||
<Command.Input
|
<Command.Input
|
||||||
value={props.search}
|
value={props.query}
|
||||||
onValueChange={props.setSearch}
|
onValueChange={props.setQuery}
|
||||||
placeholder="Quick Search..."
|
placeholder="Quick Search..."
|
||||||
/>
|
/>
|
||||||
</StyledInputContent>
|
</StyledInputContent>
|
||||||
|
|||||||
Reference in New Issue
Block a user