mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
Fix i18n for server settings.
Start work on roles. Add temporary age gate.
This commit is contained in:
@@ -5,6 +5,8 @@ import { useSelf } from "../../context/revoltjs/hooks";
|
||||
import { useHistory, useLocation } from "react-router";
|
||||
import ConditionalLink from "../../lib/ConditionalLink";
|
||||
import { Message, Group } from "@styled-icons/boxicons-solid";
|
||||
import { LastOpened } from "../../redux/reducers/last_opened";
|
||||
import { connectState } from "../../redux/connector";
|
||||
|
||||
const NavigationBase = styled.div`
|
||||
z-index: 100;
|
||||
@@ -26,15 +28,23 @@ const Button = styled.a<{ active: boolean }>`
|
||||
` }
|
||||
`;
|
||||
|
||||
export default function BottomNavigation() {
|
||||
interface Props {
|
||||
lastOpened: LastOpened
|
||||
}
|
||||
|
||||
export function BottomNavigation({ lastOpened }: Props) {
|
||||
const user = useSelf();
|
||||
const history = useHistory();
|
||||
const path = useLocation().pathname;
|
||||
|
||||
const channel_id = lastOpened['home'];
|
||||
|
||||
const friendsActive = path.startsWith("/friends");
|
||||
const settingsActive = path.startsWith("/settings");
|
||||
const homeActive = !(friendsActive || settingsActive);
|
||||
|
||||
// console.info(channel_id);
|
||||
|
||||
return (
|
||||
<NavigationBase>
|
||||
<Button active={homeActive}>
|
||||
@@ -70,3 +80,9 @@ export default function BottomNavigation() {
|
||||
</NavigationBase>
|
||||
);
|
||||
}
|
||||
|
||||
export default connectState(BottomNavigation, state => {
|
||||
return {
|
||||
lastOpened: state.lastOpened
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user