-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8745e77
commit faaea38
Showing
15 changed files
with
89 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,11 @@ import { LinkStyledAsButtonWithIcon } from '~/client/components/ui/LinkStyledAsB | |
import useAnalytics from '~/client/hooks/useAnalytics'; | ||
import analytics from '~/pages/faq/index.analytics'; | ||
import styles from '~/pages/faq/index.module.scss'; | ||
import { Question } from '~/server/faq/domain/FAQ'; | ||
import { FAQ } from '~/server/faq/domain/FAQ'; | ||
import { dependencies } from '~/server/start'; | ||
|
||
type FaqPageProps = { | ||
listeDeQuestionRéponse: Array<Question> | ||
listeDeQuestionRéponse: Array<FAQ.Question> | ||
} | ||
|
||
const MAIL_TO = '[email protected]'; | ||
|
@@ -62,7 +62,6 @@ export async function getStaticProps(): Promise<GetStaticPropsResult<FaqPageProp | |
props: { | ||
listeDeQuestionRéponse: listeDeQuestionRéponse.result, | ||
}, | ||
// TODO (BRUJ 26-09-2023): que faire de ça ??? | ||
revalidate: dependencies.cmsDependencies.duréeDeValiditéEnSecondes(), | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { Either } from '~/server/errors/either'; | ||
|
||
import { Question, QuestionSlug } from './FAQ'; | ||
import { FAQ } from './FAQ'; | ||
|
||
export interface FAQRepository { | ||
getFAQBySlug(slug: QuestionSlug): Promise<Either<Question.QuestionRéponse>> | ||
getAllFAQ(): Promise<Either<Array<Question>>> | ||
listAllFAQSlug(): Promise<Either<Array<string>>> | ||
getFAQBySlug(slug: FAQ.Slug): Promise<Either<FAQ.QuestionEtReponse>> | ||
getAllFAQ(): Promise<Either<Array<FAQ.Question>>> | ||
listAllFAQSlug(): Promise<Either<Array<FAQ.Slug>>> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
export type QuestionSlug = string | ||
export namespace FAQ { | ||
|
||
export namespace Question { | ||
export interface QuestionRéponse extends Question { | ||
export type Slug = string | ||
|
||
export interface Question { | ||
problématique: string | ||
slug: FAQ.Slug | ||
} | ||
|
||
export interface QuestionEtReponse extends Question { | ||
contenu: string | ||
} | ||
} | ||
|
||
export interface Question { | ||
problématique: string | ||
slug: QuestionSlug | ||
} | ||
|
||
export namespace FAQResponseStrapi { | ||
|
||
export interface QuestionSlug { | ||
slug: string | ||
} | ||
|
||
export namespace FAQResponse { | ||
export interface FAQ { | ||
export interface Question { | ||
problematique: string | ||
slug: string | ||
} | ||
|
||
export interface Réponse extends FAQ { | ||
export interface QuestionEtReponse extends Question { | ||
contenu: string | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
import { FAQResponse, Question } from '~/server/faq/domain/FAQ'; | ||
import { FAQ,FAQResponseStrapi } from '~/server/faq/domain/FAQ'; | ||
|
||
export const mapQuestionRéponse = (faq: FAQResponse.Réponse): Question.QuestionRéponse => { | ||
export const mapQuestionRéponse = (faq: FAQResponseStrapi.QuestionEtReponse): FAQ.QuestionEtReponse => { | ||
return { | ||
contenu: faq.contenu, | ||
problématique: faq.problematique, | ||
slug: faq.slug, | ||
}; | ||
}; | ||
|
||
export const mapQuestion = (faq: FAQResponse.FAQ): Question => { | ||
export const mapQuestion = (faq: FAQResponseStrapi.Question): FAQ.Question => { | ||
return { | ||
problématique: faq.problematique, | ||
slug: faq.slug, | ||
}; | ||
}; | ||
|
||
export const flatMapSlug = (faq: FAQResponse.FAQ): string => faq.slug; | ||
export const flatMapSlug = (faq: FAQResponseStrapi.QuestionSlug): FAQ.Slug => faq.slug; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.