clean up and start todos

This commit is contained in:
talksik
2022-05-28 14:23:56 -05:00
parent 4390302ccd
commit cedd9fc297
2 changed files with 58 additions and 36 deletions
@@ -95,8 +95,49 @@ const Conversations = () => {
<KeyboardShortcutLabel label="Shift" />
</Stack>
{searchVal && <ListPeople people={searchUsersResults} />}
{searchVal ? <ListPeople people={searchUsersResults} /> : <></>}
</>
);
};
function ListPeople({ people }: { people: User[] }) {
return (
<List
sx={{
pt: 2,
}}
subheader={
<ListSubheader>
<Typography variant="subtitle2"> Search Results</Typography>
</ListSubheader>
}
>
{people.length === 0 && (
<Typography variant="caption">
Sorry please try someone else or invite them to nirvana.
</Typography>
)}
{people.map((person) => (
<ListItem key={`${person.uid}-searchUsers`}>
<ListItemButton selected={true}>
<ListItemAvatar>
<Avatar alt={person.displayName} src={person.photoUrl} />
</ListItemAvatar>
<ListItemText primary={person.displayName} />
<Typography variant={'caption'}>20 sec</Typography>
</ListItemButton>
</ListItem>
))}
</List>
);
}
function StaticListConversations() {
return (
<>
<List
sx={{
pt: 2,
@@ -186,40 +227,5 @@ const Conversations = () => {
</List>
</>
);
};
function ListPeople({ people }: { people: User[] }) {
return (
<List
sx={{
pt: 2,
}}
subheader={
<ListSubheader>
<Typography variant="subtitle2"> Search Results</Typography>
</ListSubheader>
}
>
{people.length === 0 && (
<Typography variant="caption">
Sorry please try someone else or invite them to nirvana.
</Typography>
)}
{people.map((person) => (
<ListItem key={`${person.uid}-searchUsers`}>
<ListItemButton selected={true}>
<ListItemAvatar>
<Avatar alt={person.displayName} src={person.photoUrl} />
</ListItemAvatar>
<ListItemText primary={person.displayName} />
<Typography variant={'caption'}>20 sec</Typography>
</ListItemButton>
</ListItem>
))}
</List>
);
}
export default Conversations;
@@ -15,6 +15,22 @@ interface ITerminalContext {
const TerminalContext = React.createContext<ITerminalContext>({});
// TODOS
// fetch all conversations that I am part of
// create a convo
// 1. search
// 2. click on person
// 3. search database if there is already a convo for this
// - if yes: select this one
// - if no: create one
// 4. show the conversation details page show on right
// 5. connect live if other person there
// 6. send first clip
// 7. display all blocks/clips for convo simple and separate
// if no conversations, show stale state + create one with nirvana
export function TerminalProvider({ children }: { children?: React.ReactNode }) {
const { enqueueSnackbar } = useSnackbar();