Skip to content

Commit

Permalink
fix: lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
NdekoCode committed Nov 22, 2024
1 parent 74bdec5 commit 7a17b77
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ ARG NEXT_PUBLIC_JITSU_BROWSER_URL
ARG NEXT_PUBLIC_JITSU_BROWSER_WRITE_KEY
ARG NEXT_PUBLIC_GITHUB_APP_NAME=ever-github
ARG NEXT_PUBLIC_CHATWOOT_API_KEY
ARG NEXT_IGNORE_ESLINT_ERROR_ON_BUILD=true

FROM node:${NODE_VERSION}-slim as base
FROM node:${NODE_VERSION}-slim AS base

# Output the environment variable value
RUN echo "NEXT_PUBLIC_GAUZY_API_SERVER_URL=${NEXT_PUBLIC_GAUZY_API_SERVER_URL}"
Expand All @@ -42,7 +43,7 @@ RUN mkdir /temp && cd /temp && \
RUN npm cache clean --force

# Throw-away build stage to reduce size of final image
FROM base as build
FROM base AS build

# We make env vars passed as build argument to be available in this build stage because we prebuild the NextJs app
ARG NEXT_PUBLIC_GAUZY_API_SERVER_URL
Expand Down Expand Up @@ -80,6 +81,7 @@ RUN cd apps/web && \
COPY . .

ENV NODE_ENV=production
ENV NEXT_IGNORE_ESLINT_ERROR_ON_BUILD=true

RUN echo $NEXT_PUBLIC_GAUZY_API_SERVER_URL

Expand All @@ -96,8 +98,7 @@ RUN yarn cache clean
# Final stage for app image
FROM base

ENV NODE_ENV=production

RUN echo "NEXT_IGNORE_ESLINT_ERROR_ON_BUILD: $NEXT_IGNORE_ESLINT_ERROR_ON_BUILD"
# Copy built application
COPY --from=build /app/apps/web/.next/standalone ./
COPY --from=build /app/apps/web/.next/static ./apps/web/.next/static
Expand Down
1 change: 1 addition & 0 deletions apps/web/app/[locale]/timesheet/[memberId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use client';
/* eslint-disable react-hooks/exhaustive-deps */
import React, { useMemo, useState } from 'react';
import { useParams } from 'next/navigation';
import moment from 'moment';
Expand Down
8 changes: 4 additions & 4 deletions apps/web/app/hooks/features/useOrganizationTeams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
teamsFetchingState,
timerStatusState
} from '@app/stores';
import { useCallback, useEffect, useState } from 'react';
import { useCallback, useEffect, useMemo, useState } from 'react';
import { useAtom, useAtomValue, useSetAtom } from 'jotai';
import isEqual from 'lodash/isEqual';
import { useFirstLoad } from '../useFirstLoad';
Expand Down Expand Up @@ -305,8 +305,8 @@ export function useOrganizationTeams() {
const [isTeamManager, setIsTeamManager] = useState(false);
// const setMemberActiveTaskId = useSetAtom(memberActiveTaskIdState);

const members = activeTeam?.members || [];
const currentUser = activeTeam?.members?.find((member) => member.employee.userId === user?.id);
const members = useMemo(() => activeTeam?.members || [], [activeTeam?.members]);
const currentUser = members.find((member) => member.employee.userId === user?.id);

const memberActiveTaskId =
(timerStatus?.running && timerStatus?.lastLog?.taskId) || currentUser?.activeTaskId || null;
Expand Down Expand Up @@ -492,7 +492,7 @@ export function useOrganizationTeams() {
setActiveProjectIdCookie(activeTeam?.projects[0]?.id);
}
isManager();
}, [activeTeam]);
}, [activeTeam, isManager]);

return {
loadTeamsData,
Expand Down

0 comments on commit 7a17b77

Please sign in to comment.