Skip to content

Commit

Permalink
Merge pull request #2217 from ever-co/fix/errors
Browse files Browse the repository at this point in the history
Fix: Errors
  • Loading branch information
evereq authored Feb 16, 2024
2 parents 180454c + 88f70b9 commit fe46f2c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions apps/web/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const poppins = Poppins({
const LocaleLayout = ({ children, params: { locale }, pageProps }: Props) => {
// Validate that the incoming `locale` parameter is valid
if (!locales.includes(locale as any)) notFound();
const { isApiWork } = useCheckAPI();
const { isApiWork, loading } = useCheckAPI();
// Enable static rendering
// unstable_setRequestLocale(locale);

Expand All @@ -80,7 +80,7 @@ const LocaleLayout = ({ children, params: { locale }, pageProps }: Props) => {
<body className={clsx('flex h-full flex-col dark:bg-[#191A20]')}>
<RecoilRoot>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
{isApiWork ? (
{isApiWork || loading ? (
<>
<AppState />
<JitsuRoot pageProps={pageProps}>{children}</JitsuRoot>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/[locale]/settings/team/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const Team = () => {
<SettingsTeamSkeleton />
) : (
<MainLayout
className="items-start pb-1 h-screen "
className="items-start pb-1 h-screen overflow-hidden"
childrenClassName="overflow-hidden h-full w-screen flex flex-col items-start"
>
<div className="pt-12 w-full pb-4 bg-white dark:bg-dark--theme">
Expand Down
5 changes: 3 additions & 2 deletions apps/web/app/hooks/useCheckAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useQuery } from './useQuery';
import { getDefaultAPI } from '@app/services/client/api';

export function useCheckAPI() {
const { queryCall } = useQuery(getDefaultAPI);
const { queryCall, loading } = useQuery(getDefaultAPI);
const [isApiWork, setIsApiWork] = React.useState(true);

const checkAPI = useCallback(() => {
Expand All @@ -23,6 +23,7 @@ export function useCheckAPI() {
}, [checkAPI]);

return {
isApiWork
isApiWork,
loading
};
}
8 changes: 5 additions & 3 deletions apps/web/lib/features/task/task-activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export function TaskActivity({ task }: { task: ITeamTask }) {
shadow="bigger"
>
<div className="flex justify-between items-center gap-5 py-2 border-b border-b-[#00000014] dark:border-b-[#7B8089]">
<div className="flex items-center gap-2 my-2">
<h4 className="text-base">{'Timesheet'}</h4>
<div className="flex items-center gap-2 mb-2">
<h4 className="text-base font-semibold">{'Timesheet'}</h4>
</div>

<div className="flex items-center justify-end gap-2.5">
Expand All @@ -41,7 +41,9 @@ export function TaskActivity({ task }: { task: ITeamTask }) {
</div>
</div>
<div className={clsxm('flex flex-col max-h-80 gap-3', hidden && ['hidden'])}>
{groupedData.map((timesheet, i) => (
{groupedData.length < 1 ?
<p className="mx-auto ">There is no Activity</p> :
groupedData.map((timesheet, i) => (
<div
key={i}
className="shadow-lg rounded-lg p-4 bg-light dark:bg-dark border border-[#00000014] dark:border-[#26272C]"
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/settings/sync.zone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const RealTimePopup = ({ closeModal, open }: { closeModal: () => void; op
<div className="sm:w-[530px] w-[330px]">
<Card className="w-full" shadow="custom">
<div>
<p className="py-4 text-center">{t('alerts.ALERT_REMOVE_TEAM')}</p>
<p className="py-4 text-center">{t('alerts.REAL_TIME_ON_WORKING')}</p>
<div className="flex justify-center gap-2">
<Button
onClick={() => {
Expand Down

0 comments on commit fe46f2c

Please sign in to comment.