Skip to content

Commit

Permalink
Merge pull request #202 from GoofyComponent/develop
Browse files Browse the repository at this point in the history
chore: Production test 2
  • Loading branch information
DestroyCom committed Sep 2, 2023
2 parents 4b7151f + c547d59 commit 6eb46ad
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ on:
jobs:
build_server:
uses: ./.github/workflows/build_server_image.yml
secrets: inherit
build_webapp:
needs: build_server
uses: ./.github/workflows/build_web_image.yml
secrets: inherit
deploy_release:
needs: build_webapp
uses: ./.github/workflows/create_release.yml
secrets: inherit
notify:
needs: deploy_release
runs-on: ubuntu-latest
Expand Down
File renamed without changes.
File renamed without changes.
30 changes: 29 additions & 1 deletion sera-front/src/components/app/navigation/Nav.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,41 @@
import { Separator } from "@/components/ui/separator";
import clsx from "clsx";
import { BookOpen, DoorOpen, Home, Ticket } from "lucide-react";
import { BookOpen, DoorOpen, FolderOpen, Home, Ticket } from "lucide-react";
import { useSelector } from "react-redux";
import { Link, matchPath, useLocation } from "react-router-dom";

export const Nav = () => {
const pathname = useLocation();

const lastSeenProject = useSelector(
(state: any) => state.app.lastSeenProjectId
);

return (
<nav className="h-[90vh] w-[14%] border-r-2 border-[#D3D4D5]">
<ul className="flex h-full flex-col justify-start py-4">
{lastSeenProject && (
<>
<Link
to={`/dashboard/projects/${lastSeenProject}`}
className={clsx(
"mx-2 my-2 h-14 rounded-lg px-1 transition-all",
"flex text-sera-jet",
matchPath(
pathname.pathname,
`/dashboard/projects/${lastSeenProject}`
) && "bg-sera-jet text-sera-periwinkle ",
"hover:cursor-pointer hover:bg-sera-jet hover:text-sera-periwinkle"
)}
>
<FolderOpen size={32} className="my-auto mr-2" />
<p className="my-auto hidden text-2xl font-semibold lg:block">
Last seen
</p>
</Link>
<Separator className="my-2 mr-2" />
</>
)}
<Link
to="/dashboard"
className={clsx(
Expand Down
7 changes: 6 additions & 1 deletion sera-front/src/helpers/slices/AppSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { createSlice } from "@reduxjs/toolkit";
const initialState = {
isPreviouslyLoggedIn: false,
appError: null,
lastSeenProjectId: null,
};

export const AppSlice = createSlice({
Expand All @@ -15,12 +16,16 @@ export const AppSlice = createSlice({
setAppError: (state, action) => {
state.appError = action.payload;
},
setLastSeenProjectId: (state, action) => {
state.lastSeenProjectId = action.payload;
},
reset: () => {
return initialState;
},
},
});

export const { registerLogin, setAppError, reset } = AppSlice.actions;
export const { registerLogin, setAppError, reset, setLastSeenProjectId } =
AppSlice.actions;

export default AppSlice.reducer;
8 changes: 8 additions & 0 deletions sera-front/src/pages/Project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@ import { MembersContainer } from "@/components/app/project/Members/MembersContai
import { SharedContainer } from "@/components/app/project/SharedRessources/SharedContainer";
import { StepsIndicatorContainer } from "@/components/app/project/StepsIndicator/StepsIndicatorContainer";
import { Separator } from "@/components/ui/separator";
import { useDispatch } from "react-redux";
import { setLastSeenProjectId } from "@/helpers/slices/AppSlice";
import { useEffect } from "react";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { axios } from "@/lib/axios";

import { BigLoader } from "./skeletons/BigLoader";

export const Project = () => {
const { ProjectId: id } = useParams<{ ProjectId: string }>();
const dispatch = useDispatch();

useEffect(() => {
dispatch(setLastSeenProjectId(id));
}, [id]);

const {
data: projectData,
Expand Down

0 comments on commit 6eb46ad

Please sign in to comment.