fix(home): fix the create group button

closes #546
This commit is contained in:
Paul Makles 2022-03-04 16:46:50 +00:00
parent 0f8be1767d
commit 498e76b535

View file

@ -21,9 +21,9 @@ import { isTouchscreenDevice } from "../../lib/isTouchscreenDevice";
import { useApplicationState } from "../../mobx/State"; import { useApplicationState } from "../../mobx/State";
import { useIntermediate } from "../../context/intermediate/Intermediate";
import { AppContext } from "../../context/revoltjs/RevoltClient"; import { AppContext } from "../../context/revoltjs/RevoltClient";
import Tooltip from "../../components/common/Tooltip";
import { PageHeader } from "../../components/ui/Header"; import { PageHeader } from "../../components/ui/Header";
import CategoryButton from "../../components/ui/fluent/CategoryButton"; import CategoryButton from "../../components/ui/fluent/CategoryButton";
import wideSVG from "/assets/wide.svg"; import wideSVG from "/assets/wide.svg";
@ -42,6 +42,7 @@ const Overlay = styled.div`
`; `;
export default observer(() => { export default observer(() => {
const { openScreen } = useIntermediate();
const client = useContext(AppContext); const client = useContext(AppContext);
const state = useApplicationState(); const state = useApplicationState();
@ -93,7 +94,13 @@ export default observer(() => {
<img src={wideSVG} /> <img src={wideSVG} />
</h3> </h3>
<div className={styles.actions}> <div className={styles.actions}>
<Link to="/settings"> <a
onClick={() =>
openScreen({
id: "special_input",
type: "create_group",
})
}>
<CategoryButton <CategoryButton
action="chevron" action="chevron"
icon={<PlusCircle size={32} />} icon={<PlusCircle size={32} />}
@ -102,7 +109,7 @@ export default observer(() => {
}> }>
<Text id="app.home.group" /> <Text id="app.home.group" />
</CategoryButton> </CategoryButton>
</Link> </a>
<Link to="/discover"> <Link to="/discover">
<a> <a>
<CategoryButton <CategoryButton