Skip to content

Commit

Permalink
refactor: move pages from components to pages dir
Browse files Browse the repository at this point in the history
  • Loading branch information
pooriamehregan committed Sep 20, 2023
1 parent 2f9ddd1 commit d2a1416
Show file tree
Hide file tree
Showing 39 changed files with 116 additions and 90 deletions.
16 changes: 8 additions & 8 deletions src/app/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import cx from 'classnames';
import localization from '../lib/localization';
import { MainPage } from '../pages/main-page/main-page';
import { SearchPage } from '../pages/search-page/search-page';
import DatasetDetailsPage from '../components/dataset-details-page';
import DataServiceDetailsPage from '../components/data-service-details-page';
import ConceptDetailsPage from '../components/concept-details-page';
import InformationModelDetailsPage from '../components/information-model-details-page';
import PublicServiceDetailsPage from '../components/public-service-details-page';
import EventDetailsPage from '../components/event-details-page';
import DatasetDetailsPage from '../pages/dataset-details-page';
import DataServiceDetailsPage from '../pages/data-service-details-page';
import ConceptDetailsPage from '../pages/concept-details-page';
import InformationModelDetailsPage from '../pages/information-model-details-page';
import PublicServiceDetailsPage from '../pages/public-service-details-page';
import EventDetailsPage from '../pages/event-details-page';
import { ConnectedConceptComparePage } from '../pages/concept-compare-page/connected-concept-compare-page';
import { ReportPage } from '../pages/report-page/report-page';
import ErrorPage from '../components/error-page';
import SparqlPage from '../components/sparql-page';
import ErrorPage from '../pages/error-page';
import SparqlPage from '../pages/sparql-page';
import Header from '../components/header';
import { Breadcrumbs } from './breadcrumbs/breadcrumbs.component';
import Footer from '../components/footer';
Expand Down
2 changes: 1 addition & 1 deletion src/app/connected-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { App } from './app';
import { setLanguageAction } from '../redux/modules/settings';

import withErrorBoundary from '../components/with-error-boundary';
import ErrorPage from '../components/error-page';
import ErrorPage from '../pages/error-page';

const mapStateToProps = state => ({
// react-localization module designed to be stateful, so we have to re-render the app when the selected language is changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import withCommunity, {
Props as CommunityProps
} from '../../../with-community';
import Aside from '../aside';
import RelationsContainer from '../../../concept-details-page/RelatedConcepts';
import RelationsContainer from '../../../../pages/concept-details-page/RelatedConcepts';

interface ExternalProps {
entity: Entity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { InformationModelItem } from '../informationmodel-item/informationmodel-
import { PublicServiceItem } from '../public-service-item/public-service-item';
import EventItem from '../event-item';
import withErrorBoundary from '../with-error-boundary';
import ErrorPage from '../error-page';
import ErrorPage from '../../pages/error-page';

import type { Entity as EntityType, Concept } from '../../types';
import { Entity } from '../../types/enums';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ai-project-page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SvgIcon from '@fellesdatakatalog/icons';
import Button, { Variant } from '@fellesdatakatalog/button';
import Link from '@fellesdatakatalog/link';
import Spinner from '../../components/spinner';
import ErrorPage from '../../components/error-page';
import ErrorPage from '../error-page';
import withErrorBoundary from '../../components/with-error-boundary';
import Project from './components/project';
import localization from '../../lib/localization';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/cms-article-page/cms-article-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { compose } from 'redux';

import CmsArticlePagePure from './cms-article-page-pure';
import { cmsArticlePageResolver } from './cms-article-page-resolver';
import ErrorPage from '../../components/error-page';
import ErrorPage from '../error-page';
import withErrorBoundary from '../../components/with-error-boundary';

const enhance = compose(cmsArticlePageResolver, withErrorBoundary(ErrorPage));
Expand Down
2 changes: 1 addition & 1 deletion src/pages/cms-information-page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
PATHNAME_ABOUT_INFORMATIONMODELS
} from '../../constants/constants';

import ErrorPage from '../../components/error-page';
import ErrorPage from '../error-page';

import { isBasicImage, isBasicParagraph } from '../../lib/strapi';
import Markdown from '../../components/markdown';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/cms-transport-page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useGetTransportArticleQuery } from '../../api/generated/cms/graphql';

import { PATHNAME_TRANSPORT } from '../../constants/constants';

import ErrorPage from '../../components/error-page';
import ErrorPage from '../error-page';

import {
isBasicImage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
removeConceptAction
} from '../../redux/modules/conceptsCompare';

import ErrorPage from '../../components/error-page';
import ErrorPage from '../error-page';
import withErrorBoundary from '../../components/with-error-boundary';
import { ConceptComparePage } from './concept-compare-page';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ContentSection,
KeyValueList,
KeyValueListItem
} from '../../details-page';
} from '../../../components/details-page';
import translations from '../../../lib/localization';
import { Entity } from '../../../types/enums';
import { PATHNAME_CONCEPTS } from '../../../constants/constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@ import { deepKeys } from '../../lib/deep-keys';
import { languageSorter } from '../../lib/languageSorter';
import { themeFDK } from '../../app/theme';

import type { Props as ConceptProps } from '../with-concept';
import withConcept from '../with-concept';
import type { Props as DatasetsProps } from '../with-datasets';
import withDatasets from '../with-datasets';
import type { Props as InformationModelsProps } from '../with-information-models';
import withInformationModels from '../with-information-models';
import type { Props as ConceptsProps } from '../with-concepts';
import withConcepts from '../with-concepts';
import type { Props as PublicServicesProps } from '../with-public-services';
import withPublicServices from '../with-public-services';
import withErrorBoundary from '../with-error-boundary';
import type { Props as ConceptProps } from '../../components/with-concept';
import withConcept from '../../components/with-concept';
import type { Props as DatasetsProps } from '../../components/with-datasets';
import withDatasets from '../../components/with-datasets';
import type { Props as InformationModelsProps } from '../../components/with-information-models';
import withInformationModels from '../../components/with-information-models';
import type { Props as ConceptsProps } from '../../components/with-concepts';
import withConcepts from '../../components/with-concepts';
import type { Props as PublicServicesProps } from '../../components/with-public-services';
import withPublicServices from '../../components/with-public-services';
import withErrorBoundary from '../../components/with-error-boundary';

import DetailsPage, {
ContentSection,
KeyValueList,
KeyValueListItem
} from '../details-page';
} from '../../components/details-page';
import ErrorPage from '../error-page';
import MultiLingualField from '../multilingual-field';
import type { ItemWithRelationType } from '../relation-list';
import RelationList from '../relation-list';
import MultiLingualField from '../../components/multilingual-field';
import type { ItemWithRelationType } from '../../components/relation-list';
import RelationList from '../../components/relation-list';

import SC from './styled';

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,32 @@ import { themeFDK } from '../../app/theme';

import withDataService, {
Props as DataServiceProps
} from '../with-data-service';
} from '../../components/with-data-service';
import withReferenceData, {
Props as ReferenceDataProps
} from '../with-reference-data';
import withDatasets, { Props as DatasetsProps } from '../with-datasets';
} from '../../components/with-reference-data';
import withDatasets, {
Props as DatasetsProps
} from '../../components/with-datasets';
import withInformationModels, {
Props as InformationModelsProps
} from '../with-information-models';
import withErrorBoundary from '../with-error-boundary';
} from '../../components/with-information-models';
import withErrorBoundary from '../../components/with-error-boundary';

import DetailsPage, {
ContentSection,
KeyValueList,
KeyValueListItem,
InlineList
} from '../details-page';
} from '../../components/details-page';
import ErrorPage from '../error-page';
import RelationList from '../relation-list';
import RelationList from '../../components/relation-list';

import SC from './styled';

import type { Theme } from '../../types';
import { Entity } from '../../types/enums';
import Markdown from '../markdown';
import Markdown from '../../components/markdown';

interface RouteParams {
dataServiceId: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,41 +22,51 @@ import {

import { themeFDK, themeNAP } from '../../app/theme';

import withDataset, { Props as DatasetProps } from '../with-dataset';
import withDataset, {
Props as DatasetProps
} from '../../components/with-dataset';
import withReferenceData, {
Props as ReferenceDataProps
} from '../with-reference-data';
import withConcepts, { Props as ConceptsProps } from '../with-concepts';
import withDatasets, { Props as DatasetsProps } from '../with-datasets';
} from '../../components/with-reference-data';
import withConcepts, {
Props as ConceptsProps
} from '../../components/with-concepts';
import withDatasets, {
Props as DatasetsProps
} from '../../components/with-datasets';
import withPublicServices, {
Props as PublicServicesProps
} from '../with-public-services';
} from '../../components/with-public-services';
import withDataServices, {
Props as DataServicesProps
} from '../with-data-services';
import withKartverket, { Props as KartverketProps } from '../with-kartverket';
import withErrorBoundary from '../with-error-boundary';
} from '../../components/with-data-services';
import withKartverket, {
Props as KartverketProps
} from '../../components/with-kartverket';
import withErrorBoundary from '../../components/with-error-boundary';

import DetailsPage, {
ContentSection,
InlineList,
KeyValueList,
KeyValueListItem
} from '../details-page';
} from '../../components/details-page';
import ErrorPage from '../error-page';
import DatasetDistribution from '../dataset-distribution';
import RelationList, { ItemWithRelationType } from '../relation-list';
import DatasetDistribution from '../../components/dataset-distribution';
import RelationList, {
ItemWithRelationType
} from '../../components/relation-list';

import DownloadIcon from '../../images/icon-download-sm.svg';
import EyeIcon from '../../images/icon-eye.svg';

import Preview from '../dataset-distribution/components/preview';
import Preview from '../../components/dataset-distribution/components/preview';

import SC from './styled';

import { Entity } from '../../types/enums';
import { AccessService, Distribution, MediaTypeOrExtent } from '../../types';
import Markdown from '../markdown';
import Markdown from '../../components/markdown';

interface RouteParams {
datasetId?: string;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import Error400 from './components/error-400';
import Error500 from './components/error-500';

import SC from './styled';
import Header from '../header';
import Footer from '../footer';
import Header from '../../components/header';
import Footer from '../../components/footer';

interface Props {
errorCode?: string;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,28 @@ import { dateStringToDate, formatDate } from '../../lib/date-utils';

import { themeFDK } from '../../app/theme';

import withEvent, { Props as EventProps } from '../with-event';
import withEvent, { Props as EventProps } from '../../components/with-event';
import withPublicServices, {
Props as PublicServicesProps
} from '../with-public-services';
import withErrorBoundary from '../with-error-boundary';
} from '../../components/with-public-services';
import withErrorBoundary from '../../components/with-error-boundary';

import DetailsPage, {
ContentSection,
KeyValueList,
KeyValueListItem
} from '../details-page';
} from '../../components/details-page';
import ErrorPage from '../error-page';
import RelationList, { ItemWithRelationType } from '../relation-list';
import RelationList, {
ItemWithRelationType
} from '../../components/relation-list';

import type { Theme } from '../../types';
import { Entity, SpecializedEventType } from '../../types/enums';

import { PATHNAME_PUBLIC_SERVICES } from '../../constants/constants';
import SC from './styled';
import Markdown from '../markdown';
import Markdown from '../../components/markdown';

interface RouteParams {
eventId: string;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,37 @@ import { themeFDK } from '../../app/theme';

import withInformationModel, {
Props as InformationModelProps
} from '../with-information-model';
import withConcepts, { Props as ConceptsProps } from '../with-concepts';
} from '../../components/with-information-model';
import withConcepts, {
Props as ConceptsProps
} from '../../components/with-concepts';
import withInformationModels, {
Props as InformationModelsProps
} from '../with-information-models';
import withDatasets, { Props as DatasetProps } from '../with-datasets';
} from '../../components/with-information-models';
import withDatasets, {
Props as DatasetProps
} from '../../components/with-datasets';
import withDataServices, {
Props as DataServicesProps
} from '../with-data-services';
import withErrorBoundary from '../with-error-boundary';
} from '../../components/with-data-services';
import withErrorBoundary from '../../components/with-error-boundary';

import DetailsPage, {
ContentSection,
InlineList,
KeyValueList,
KeyValueListItem
} from '../details-page';
} from '../../components/details-page';
import ErrorPage from '../error-page';
import InfoModelStructure from '../infomodel-structure';
import RelationList from '../relation-list';
import InfoModelStructure from '../../components/infomodel-structure';
import RelationList from '../../components/relation-list';

import SC from './styled';

import type { InformationModel } from '../../types';
import { Entity, DataFormat } from '../../types/enums';
import { getConfig } from '../../config';
import Markdown from '../markdown';
import Markdown from '../../components/markdown';

interface RouteParams {
informationModelId: string;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/news-archive-page/news-archive-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { compose } from 'redux';
import NewsArchivePagePure from './news-archive-page-pure';
import { newsArchivePageResolver } from './news-archive-page-resolver';

import ErrorPage from '../../components/error-page';
import ErrorPage from '../error-page';
import withErrorBoundary from '../../components/with-error-boundary';

const enhance = compose(newsArchivePageResolver, withErrorBoundary(ErrorPage));
Expand Down
2 changes: 1 addition & 1 deletion src/pages/news-article-page-v2/news-article-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useParams } from 'react-router-dom';
import { compose } from 'redux';
import Moment from 'react-moment';
import { useGetArticleQuery } from '../../api/generated/cms/graphql';
import ErrorPage from '../../components/error-page';
import ErrorPage from '../error-page';
import withErrorBoundary from '../../components/with-error-boundary';
import localization from '../../lib/localization';
// import Article from '../../components/article/components/article/article.component';
Expand Down
2 changes: 1 addition & 1 deletion src/pages/news-article-page/news-article-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { compose } from 'redux';

import NewsArticlePure from './news-article-page-pure';
import { newsArticlePageResolver } from './news-article-page-resolver';
import ErrorPage from '../../components/error-page';
import ErrorPage from '../error-page';
import withErrorBoundary from '../../components/with-error-boundary';

const enhance = compose(newsArticlePageResolver, withErrorBoundary(ErrorPage));
Expand Down
2 changes: 1 addition & 1 deletion src/pages/organizations/pages/dataset-page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import type { Props as DatasetScoresProps } from '../../../../components/with-da
import withOrganization from '../../../../components/with-organization';
import type { Props as OrganizationProps } from '../../../../components/with-organization';
import withErrorBoundary from '../../../../components/with-error-boundary';
import ErrorPage from '../../../../components/error-page';
import ErrorPage from '../../../error-page';

import SC from './styled';

Expand Down
2 changes: 1 addition & 1 deletion src/pages/organizations/pages/datasets-page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import withOrganization, {
Props as OrganizationProps
} from '../../../../components/with-organization';
import withErrorBoundary from '../../../../components/with-error-boundary';
import ErrorPage from '../../../../components/error-page';
import ErrorPage from '../../../error-page';

import { getTranslateText as translate } from '../../../../lib/translateText';
import translations from '../../../../lib/localization';
Expand Down
Loading

0 comments on commit d2a1416

Please sign in to comment.