-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from DevoteamNL/feature/search
- Loading branch information
Showing
6 changed files
with
372 additions
and
134 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
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,41 @@ | ||
import Brightness4Icon from "@mui/icons-material/Brightness4"; | ||
import Brightness7Icon from "@mui/icons-material/Brightness7"; | ||
import LogoutIcon from "@mui/icons-material/Logout"; | ||
import { | ||
Avatar, | ||
ListItemButton, | ||
} from "@mui/material"; | ||
import List from "@mui/material/List"; | ||
import ListItem from "@mui/material/ListItem"; | ||
import ListItemIcon from "@mui/material/ListItemIcon"; | ||
import ListItemText from "@mui/material/ListItemText"; | ||
import { useAuthContext } from "../../context/AuthContext"; | ||
import { useSettings } from "../../context/SettingsContext"; | ||
|
||
export const ChatHistoryFooter = () => { | ||
const { logout, profile } = useAuthContext(); | ||
const { darkMode, toggleDarkMode } = useSettings(); | ||
|
||
return ( | ||
<List> | ||
<ListItem disablePadding> | ||
<ListItemButton onClick={toggleDarkMode}> | ||
<ListItemIcon> | ||
{darkMode ? <Brightness7Icon /> : <Brightness4Icon />} | ||
</ListItemIcon> | ||
<ListItemText primary={darkMode ? "Light mode" : "Dark mode"} /> | ||
</ListItemButton> | ||
</ListItem> | ||
<ListItem disablePadding> | ||
<ListItemButton onClick={logout}> | ||
<ListItemIcon> | ||
<LogoutIcon /> | ||
</ListItemIcon> | ||
<ListItemText primary="Logout" /> | ||
<ListItemIcon> | ||
<Avatar src={profile?.picture} /> | ||
</ListItemIcon> | ||
</ListItemButton> | ||
</ListItem> | ||
</List>); | ||
}; |
Oops, something went wrong.