diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a7f622b85..83813e4b4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,12 +11,11 @@ jobs: if: github.event.release.prerelease == true strategy: matrix: - microapps: - [ + microapps: [ "WEBHOOK_ROOT_DEV", "WEBHOOK_SYLLABUS_DEV", - "WEBHOOK_CAMPUS_DEV", - "WEBHOOK_FEEDS_DEV", + # "WEBHOOK_CAMPUS_DEV", + # "WEBHOOK_FEEDS_DEV", "WEBHOOK_FORUMS_DEV", ] env: @@ -30,12 +29,11 @@ jobs: if: github.event.release.prerelease != true strategy: matrix: - microapps: - [ + microapps: [ "WEBHOOK_ROOT_PROD", "WEBHOOK_SYLLABUS_PROD", - "WEBHOOK_CAMPUS_PROD", - "WEBHOOK_FEEDS_PROD", + # "WEBHOOK_CAMPUS_PROD", + # "WEBHOOK_FEEDS_PROD", "WEBHOOK_FORUMS_PROD", ] env: diff --git a/apps/forum/src/components/index.html b/apps/forum/index.html similarity index 100% rename from apps/forum/src/components/index.html rename to apps/forum/index.html diff --git a/apps/forum/src/components/App.tsx b/apps/forum/src/components/App.tsx index 914e1e859..eb3bf5dfb 100644 --- a/apps/forum/src/components/App.tsx +++ b/apps/forum/src/components/App.tsx @@ -1,6 +1,12 @@ -import React, { useEffect, useState, lazy, Suspense } from "react"; +import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { BrowserRouter, Routes, Route, useNavigate } from "react-router-dom"; +import { + BrowserRouter, + Routes, + Route, + useNavigate, + useLocation, +} from "react-router-dom"; import HeaderWithModal from "@app/components/common/HeaderWithModal"; import { ThemeContext } from "@app/utils/theme-context"; import Board from "./Board"; @@ -13,6 +19,7 @@ import ArrowBackIcon from "@mui/icons-material/ArrowBack"; import { API } from "@aws-amplify/api"; import { getUserAttr, getIdToken, LoadingSpinner } from "wasedatime-ui"; import { storeDate } from "@app/utils/storeDate"; +import FilterAltIcon from "@mui/icons-material/FilterAlt"; const App = () => { return ( @@ -35,6 +42,7 @@ const NotFound = () => { }; const InnerApp = () => { + const location = useLocation(); const { t, i18n } = useTranslation(); const { theme, setTheme } = React.useContext(ThemeContext); @@ -42,6 +50,11 @@ const InnerApp = () => { const [board, setBoard] = useState(""); const [commentNotify, setCommentNotify] = useState(false); const navigate = useNavigate(); + const [filterButtonClicked, setFilterButtonClicked] = useState(false); + + const isThreadRoute = + location.pathname.includes("forum/") && + location.pathname.split("/").length === 4; const handleReset = () => { navigate("/forum"); @@ -71,6 +84,10 @@ const InnerApp = () => { storeDate(); }, []); + const handleFilterButtonClick = () => { + setFilterButtonClicked(!filterButtonClicked); + }; + return ( <>
This is WasedaTime forum beta.
diff --git a/apps/forum/src/components/FilterMenu.tsx b/apps/forum/src/components/FilterMenu.tsx
index ef563053c..ffc059271 100644
--- a/apps/forum/src/components/FilterMenu.tsx
+++ b/apps/forum/src/components/FilterMenu.tsx
@@ -11,7 +11,7 @@ const FilterMenu = () => {
return (