From 1aa2b1226ac7540575d3d222f5bd99fa7ce49023 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 24 Jun 2021 17:06:16 +0100 Subject: [PATCH] Fix: Set global emoji pack. Fix: Use conditional links for bottom navigation. Fix: Margin error on queued messages. --- src/components/common/messaging/Message.tsx | 2 +- src/components/navigation/BottomNavigation.tsx | 12 ++++++------ src/components/ui/Button.tsx | 1 + src/redux/reducers/settings.ts | 3 ++- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/common/messaging/Message.tsx b/src/components/common/messaging/Message.tsx index 8c71ae63..d504f966 100644 --- a/src/components/common/messaging/Message.tsx +++ b/src/components/common/messaging/Message.tsx @@ -38,7 +38,7 @@ function Message({ attachContext, message, contrast, content: replacement, head: <> { message.replies?.map((message_id, index) => ) } 0)} contrast={contrast} sending={typeof queued !== 'undefined'} mention={message.mentions?.includes(client.user!._id)} diff --git a/src/components/navigation/BottomNavigation.tsx b/src/components/navigation/BottomNavigation.tsx index 6a9ffd40..4afa8f9b 100644 --- a/src/components/navigation/BottomNavigation.tsx +++ b/src/components/navigation/BottomNavigation.tsx @@ -1,9 +1,9 @@ -import styled, { css } from "styled-components"; -import { Link } from "react-router-dom"; import IconButton from "../ui/IconButton"; import UserIcon from "../common/user/UserIcon"; +import styled, { css } from "styled-components"; import { useSelf } from "../../context/revoltjs/hooks"; import { useHistory, useLocation } from "react-router"; +import ConditionalLink from "../../lib/ConditionalLink"; import { MessageCircle, Users } from "@styled-icons/feather"; const NavigationBase = styled.div` @@ -54,18 +54,18 @@ export default function BottomNavigation() { ); diff --git a/src/components/ui/Button.tsx b/src/components/ui/Button.tsx index 2f323143..9c4b3a2b 100644 --- a/src/components/ui/Button.tsx +++ b/src/components/ui/Button.tsx @@ -10,6 +10,7 @@ export default styled.button` padding: 8px; font-size: 16px; text-align: center; + font-family: 'Open Sans', sans-serif; transition: 0.2s ease opacity; transition: 0.2s ease background-color; diff --git a/src/redux/reducers/settings.ts b/src/redux/reducers/settings.ts index bcab75c2..a37d7ef1 100644 --- a/src/redux/reducers/settings.ts +++ b/src/redux/reducers/settings.ts @@ -2,6 +2,7 @@ import { filter } from "."; import { SyncUpdateAction } from "./sync"; import { Sounds } from "../../assets/sounds/Audio"; import { Theme, ThemeOptions } from "../../context/Theme"; +import { setEmojiPack } from "../../components/common/Emoji"; export type SoundOptions = { [key in Sounds]?: boolean @@ -57,7 +58,7 @@ export function settings( state = {} as Settings, action: SettingsAction ): Settings { - // setEmojiPack(state.appearance?.emojiPack ?? 'mutant'); + setEmojiPack(state.appearance?.emojiPack ?? 'mutant'); switch (action.type) { case "SETTINGS_SET_THEME":