more progress on list of users
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
import { Select, Tag } from "antd";
|
import { Select, Tag } from "antd";
|
||||||
|
import Avatar from "antd/lib/avatar/avatar";
|
||||||
import { useEffect, useRef } from "react";
|
import { useEffect, useRef } from "react";
|
||||||
|
import { FaRegTimesCircle } from "react-icons/fa";
|
||||||
|
|
||||||
const options = [
|
const options = [
|
||||||
{ value: "gold" },
|
{ value: "gold" },
|
||||||
@@ -15,6 +17,10 @@ export default function CreateConversation() {
|
|||||||
input.current?.focus();
|
input.current?.focus();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
// as people are selected, add a list of users
|
||||||
|
// if it's an email of a non-nirvana user, then hit invite button to email them with a voice clip along with it
|
||||||
|
// if it's an existing user, then show a nice chip of that user's profile picture and their name
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto my-auto w-96">
|
<div className="mx-auto my-auto w-96">
|
||||||
<Select
|
<Select
|
||||||
@@ -29,10 +35,20 @@ export default function CreateConversation() {
|
|||||||
ref={input}
|
ref={input}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* list of existing conversations with these people */}
|
{/* list of selected people who are nirvana users */}
|
||||||
<span className="flex flex-col">
|
<span className="flex flex-row flex-wrap mt-10">
|
||||||
<span className="flex flex-row items-center p-5">
|
<span className="flex flex-row items-center py-1 px-3 space-x-2 bg-sky-200 rounded-full">
|
||||||
<span>Engineering</span>
|
<Avatar
|
||||||
|
src={"https://joeschmoe.io/api/v1/random"}
|
||||||
|
shape="square"
|
||||||
|
size={"small"}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<span className="text-sky-500 font-bold">{"Joe Smoe"}</span>
|
||||||
|
|
||||||
|
<button className="p-2 rounded-full hover:cursor-pointer text-sky-300">
|
||||||
|
<FaRegTimesCircle className="ml-auto text-lg" />
|
||||||
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import Routes from "@nirvana/common/helpers/routes";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
import { GlobalHotKeys, KeyMap, configure } from "react-hotkeys";
|
||||||
|
|
||||||
|
configure({
|
||||||
|
ignoreTags: [],
|
||||||
|
});
|
||||||
|
|
||||||
|
export default function KeyboardShortcutHandler() {
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const handleEscape = () => {
|
||||||
|
console.log("woah");
|
||||||
|
router.push(Routes.convos);
|
||||||
|
};
|
||||||
|
|
||||||
|
const keyMap: KeyMap = {
|
||||||
|
ESCAPE: "esc",
|
||||||
|
};
|
||||||
|
const handlers = { ESCAPE: handleEscape };
|
||||||
|
|
||||||
|
return <GlobalHotKeys handlers={handlers} keyMap={keyMap} />;
|
||||||
|
}
|
||||||
@@ -16,6 +16,7 @@ import {
|
|||||||
} from "react-transition-group";
|
} from "react-transition-group";
|
||||||
import CreateConversation from "../../components/v2/CreateConversation";
|
import CreateConversation from "../../components/v2/CreateConversation";
|
||||||
import { FaArrowLeft } from "react-icons/fa";
|
import { FaArrowLeft } from "react-icons/fa";
|
||||||
|
import KeyboardShortcutHandler from "../../components/v2/KeyboardShortcutHandler";
|
||||||
|
|
||||||
export default function Me() {
|
export default function Me() {
|
||||||
// figure out what content to render from here
|
// figure out what content to render from here
|
||||||
@@ -64,6 +65,8 @@ export default function Me() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
|
<KeyboardShortcutHandler />
|
||||||
|
|
||||||
<Header />
|
<Header />
|
||||||
|
|
||||||
{fullCleanPageContent ? (
|
{fullCleanPageContent ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user