Skip to content

Commit

Permalink
#144 separate pages types
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonatai committed Jan 5, 2024
1 parent 7ef1343 commit 127a1db
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Route, Routes } from 'react-router-dom';

import * as config from '../environment.json';

import { Document } from './pages/Document';
import { Document } from './pages/Document/Document';
import buildingFromSource from './pages/GettingStarted/BuildingFromSource.md';
import gswApacheMavenPath from './pages/GettingStarted/GettingStartedWithApacheMaven.md';
import gswGradlePath from './pages/GettingStarted/GettingStartedWithGradle.md';
Expand Down
13 changes: 5 additions & 8 deletions src/pages/Document.tsx → src/pages/Document/Document.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
import { nanoid } from 'nanoid';
import { Fragment } from 'react';

import * as config from '../../environment.json';
import { useGetSpec, useScrollUp } from '../Hooks';
import * as config from '../../../environment.json';
import { useGetSpec, useScrollUp } from '../../Hooks';
import {
Divide,
Feature,
Layout,
LoadingSpinner,
Message,
} from '../components';
} from '../../components';
import { IDocument } from 'spock-react/pages/document-types';

interface IExampleOne {
fileName: string;
}

export const Document = (props: IExampleOne): JSX.Element => {
export const Document = (props: IDocument): JSX.Element => {
const { fileName } = props;

const { data, isLoading, isError } = useGetSpec({ fileName });
Expand Down
5 changes: 5 additions & 0 deletions src/pages/Document/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module 'spock-react/pages/document-types' {
interface IDocument {
fileName: string;
}
}

0 comments on commit 127a1db

Please sign in to comment.