mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 20:27:23 +00:00
Add activities page.
This commit is contained in:
@@ -2,12 +2,7 @@ import { app } from "../app.ts";
|
||||
import { network } from "../network/network.ts";
|
||||
import { useNavigate, useOutlet } from "react-router";
|
||||
import { createContext, useContext, useEffect, useState } from "react";
|
||||
import {
|
||||
MdArrowUpward,
|
||||
MdOutlinePerson,
|
||||
MdSearch,
|
||||
MdSettings,
|
||||
} from "react-icons/md";
|
||||
import { MdArrowUpward, MdOutlinePerson, MdSearch } from "react-icons/md";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import UploadingSideBar from "./uploading_side_bar.tsx";
|
||||
import { ThemeSwitcher } from "./theme_switcher.tsx";
|
||||
@@ -87,20 +82,17 @@ export default function Navigator() {
|
||||
>
|
||||
<a>{t("Tags")}</a>
|
||||
</li>
|
||||
<li
|
||||
onClick={() => {
|
||||
const menu = document.getElementById(
|
||||
"navi_menu",
|
||||
) as HTMLElement;
|
||||
menu.blur();
|
||||
navigate("/manage");
|
||||
}}
|
||||
>
|
||||
<a>{t("Settings")}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href={"https://github.com/wgh136/nysoure"} target={"_blank"}>
|
||||
{"Github"}
|
||||
<a
|
||||
onClick={() => {
|
||||
const menu = document.getElementById(
|
||||
"navi_menu",
|
||||
) as HTMLElement;
|
||||
menu.blur();
|
||||
navigate("/activity");
|
||||
}}
|
||||
>
|
||||
{t("Activity")}
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
@@ -161,6 +153,13 @@ export default function Navigator() {
|
||||
>
|
||||
<a>{t("Random")}</a>
|
||||
</li>
|
||||
<li
|
||||
onClick={() => {
|
||||
navigate("/activity");
|
||||
}}
|
||||
>
|
||||
<a>{t("Activity")}</a>
|
||||
</li>
|
||||
<li
|
||||
onClick={() => {
|
||||
navigate("/about");
|
||||
@@ -175,16 +174,6 @@ export default function Navigator() {
|
||||
<SearchBar />
|
||||
<UploadingSideBar />
|
||||
<ThemeSwitcher />
|
||||
{app.isLoggedIn() && (
|
||||
<button
|
||||
className={"btn btn-circle btn-ghost hidden sm:inline-flex"}
|
||||
onClick={() => {
|
||||
navigate("/manage");
|
||||
}}
|
||||
>
|
||||
<MdSettings size={24} />
|
||||
</button>
|
||||
)}
|
||||
<a
|
||||
className={"hidden sm:inline"}
|
||||
href="https://github.com/wgh136/nysoure"
|
||||
@@ -284,6 +273,19 @@ function UserButton() {
|
||||
{t("Publish")}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
onClick={() => {
|
||||
navigate(`/manage`);
|
||||
const menu = document.getElementById(
|
||||
"navi_dropdown_menu",
|
||||
) as HTMLUListElement;
|
||||
menu.blur();
|
||||
}}
|
||||
>
|
||||
{t("Settings")}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
onClick={() => {
|
||||
|
Reference in New Issue
Block a user