-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
165 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import {Group} from "@mantine/core" | ||
import ToggleSecondaryPanel from "@/components/DualPanel/ToggleSecondaryPanel" | ||
|
||
export default function ActionButtons() { | ||
return ( | ||
<Group justify="space-between"> | ||
<Group>Some button here</Group> | ||
<Group> | ||
<ToggleSecondaryPanel /> | ||
</Group> | ||
</Group> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import type {SearchResultNode} from "@/types" | ||
|
||
type Args = { | ||
item: SearchResultNode | ||
} | ||
|
||
export default function SearchResultItem({item}: Args) { | ||
return <div>{item.title}</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {useContext} from "react" | ||
import {useSelector} from "react-redux" | ||
import {RootState} from "@/app/types" | ||
import {selectSearchResultItems} from "@/slices/dualPanel/dualPanel" | ||
import SearchResultItem from "./SearchResultItem" | ||
import PanelContext from "@/contexts/PanelContext" | ||
import {PanelMode} from "@/types" | ||
|
||
export default function SearchResultItems() { | ||
const mode: PanelMode = useContext(PanelContext) | ||
const items = useSelector((state: RootState) => | ||
selectSearchResultItems(state, mode) | ||
) | ||
const itemComponents = items?.data?.map(i => <SearchResultItem item={i} />) | ||
|
||
return <div>{itemComponents}</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import {Flex} from "@mantine/core" | ||
|
||
import ActionButtons from "./ActionButtons" | ||
import SearchResultItems from "./SearchResultItems" | ||
|
||
export default function SearchResults() { | ||
return ( | ||
<div> | ||
<ActionButtons /> | ||
<Flex style={{height: "740px"}}> | ||
<SearchResultItems /> | ||
</Flex> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import SearchResults from "./SearchResults" | ||
|
||
export default SearchResults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters