Skip to content

Commit

Permalink
Migrate Login folder in templates to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Eric Garcia committed Aug 11, 2023
1 parent 7dd35f4 commit a0b44a8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ import { APISDGFIP } from '../../../config/data-provider-configurations';
import { APISFRANCECONNECTED } from '../../../config/data-provider-configurations';
import { useDataProvider } from '../hooks/use-data-provider';

const NextSteps = ({ targetApi, isService = false }) => {
type NextStepsProps = {
targetApi: string;
isService: boolean;
};

const NextSteps: React.FC<NextStepsProps> = ({
targetApi,
isService = false,
}) => {
const [stat, setStat] = useState(null);

const { label: targetApiLabel } = useDataProvider(targetApi);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import React from 'react';
import { useDataProvider } from '../hooks/use-data-provider';

const WelcomeMessage = ({
type WelcomeMessageProps = {
isOnNewEnrollmentPage: boolean;
targetApi: string;
newEnrollmentPageMessage?: JSX.Element;
newEnrollmentPageSubTitleMessage?: JSX.Element;
};

const WelcomeMessage: React.FC<WelcomeMessageProps> = ({
isOnNewEnrollmentPage,
targetApi,
newEnrollmentPageMessage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ import { DataProviderType } from '../../../config/data-provider-configurations';
import { APISDGFIP } from '../../../config/data-provider-configurations';
import { APISFRANCECONNECTED } from '../../../config/data-provider-configurations';

const WelcomeMessageRouter = ({ targetApi, isOnNewEnrollmentPage }) => {
type WelcomeMessageRouterProps = {
targetApi: string;
isOnNewEnrollmentPage: boolean;
};

const WelcomeMessageRouter: React.FC<WelcomeMessageRouterProps> = ({
targetApi,
isOnNewEnrollmentPage,
}) => {
if (!isOnNewEnrollmentPage) {
return (
<WelcomeMessage
Expand All @@ -22,7 +30,7 @@ const WelcomeMessageRouter = ({ targetApi, isOnNewEnrollmentPage }) => {
return (
<WelcomeMessage
isOnNewEnrollmentPage={isOnNewEnrollmentPage}
target_api={targetApi}
targetApi={targetApi}
newEnrollmentPageSubTitleMessage={
<>
<br />
Expand Down

0 comments on commit a0b44a8

Please sign in to comment.