Skip to content

Commit

Permalink
refactor: minor cleanup
Browse files Browse the repository at this point in the history
- keep type imports on top
- remove unused dependency
  • Loading branch information
mohitb35 committed Jan 3, 2025
1 parent c4c5ad5 commit 34a281a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions pages/sites/[slug]/[locale]/profile/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
} from 'next';
import type { Tenant } from '@planet-sdk/common/build/types/tenant';

import React from 'react';
import { useEffect } from 'react';
import Head from 'next/head';
import UserLayout from '../../../../../src/features/common/Layout/UserLayout/UserLayout';
import { useTranslations } from 'next-intl';
Expand All @@ -30,7 +30,7 @@ function EditProfilePage({ pageProps: { tenantConfig } }: Props): ReactElement {
const router = useRouter();
const { setTenantConfig } = useTenant();

React.useEffect(() => {
useEffect(() => {
if (router.isReady) {
setTenantConfig(tenantConfig);
}
Expand Down
15 changes: 7 additions & 8 deletions pages/sites/[slug]/[locale]/projects-archive/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import type { AbstractIntlMessages } from 'next-intl';
import type { APIError } from '@planet-sdk/common';
import type { Tenant } from '@planet-sdk/common/build/types/tenant';
import type { DirectGiftI } from '../../../../../src/features/donations/components/DirectGift';
import type { SetState } from '../../../../../src/features/common/types/common';
import type { MapProject } from '../../../../../src/features/common/types/ProjectPropsContextInterface';

import { useRouter } from 'next/router';
import React from 'react';
import ProjectsList from '../../../../../src/features/projects/screens/Projects';
Expand All @@ -8,28 +15,20 @@ import { useProjectProps } from '../../../../../src/features/common/Layout/Proje
import Credits from '../../../../../src/features/projectsV2/ProjectsMap/Credits';
import Filters from '../../../../../src/features/projects/components/projects/Filters';
import { ErrorHandlingContext } from '../../../../../src/features/common/Layout/ErrorHandlingContext';
import type {
DirectGiftI,
} from '../../../../../src/features/donations/components/DirectGift';
import DirectGift from '../../../../../src/features/donations/components/DirectGift';
import { useLocale } from 'next-intl';
import type { APIError } from '@planet-sdk/common';
import { handleError } from '@planet-sdk/common';
import type { SetState } from '../../../../../src/features/common/types/common';
import type { MapProject } from '../../../../../src/features/common/types/ProjectPropsContextInterface';
import {
constructPathsForTenantSlug,
getTenantConfig,
} from '../../../../../src/utils/multiTenancy/helpers';
import type { Tenant } from '@planet-sdk/common/build/types/tenant';
import { useTenant } from '../../../../../src/features/common/Layout/TenantContext';
import type {
GetStaticProps,
GetStaticPropsContext,
GetStaticPropsResult,
} from 'next';
import { defaultTenant } from '../../../../../tenant.config';
import type { AbstractIntlMessages } from 'next-intl';
import getMessagesForPage from '../../../../../src/utils/language/getMessagesForPage';

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion src/features/user/Settings/EditProfile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import EditProfileForm from './EditProfileForm';
import SingleColumnView from '../../../common/Layout/SingleColumnView';
import AddressManagement from './AddressManagement';

export default function EditProfile(): React.ReactElement | null {
export default function EditProfile(): ReactElement {
const t = useTranslations('Me');

return (
Expand Down

0 comments on commit 34a281a

Please sign in to comment.