Skip to content

Commit

Permalink
fix error path of nodemodules
Browse files Browse the repository at this point in the history
  • Loading branch information
Jugurtha Bouhadoun committed Oct 30, 2024
1 parent 0be53a5 commit 1021e56
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 9 deletions.
Binary file added public/fonts/Marianne-Bold.woff
Binary file not shown.
Binary file added public/fonts/Marianne-Bold_Italic.woff
Binary file not shown.
Binary file added public/fonts/Marianne-Regular.woff
Binary file not shown.
Binary file added public/fonts/Marianne-Regular_Italic.woff
Binary file not shown.
4 changes: 0 additions & 4 deletions src/app/api/certificat/[idAdresse]/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ export async function GET(request: NextRequest, { params }: { params: { idAdress
}

const { banId: addressID } = address
console.log(`${NEXT_PUBLIC_API_BAN_URL}/api/certificate/`)
console.log(JSON.stringify({ addressID }))
console.log(`Token ${BAN_API_TOKEN}`)
const response = await fetch(`${NEXT_PUBLIC_API_BAN_URL}/api/certificate/`, {
method: 'POST',
headers: {
Expand All @@ -58,7 +55,6 @@ export async function GET(request: NextRequest, { params }: { params: { idAdress
},
body: JSON.stringify({ addressID }),
})
console.log(response)

if (!response.ok) {
const errorMessage = `Erreur ${response.status}: ${response.statusText}`
Expand Down
8 changes: 4 additions & 4 deletions src/components/Document/numerotation/certificat.styles.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { StyleSheet, Font } from '@react-pdf/renderer'
const fontSource = 'node_modules/@codegouvfr/react-dsfr/dsfr/fonts/Marianne-Regular.woff'
const fontSourceBold = 'node_modules/@codegouvfr/react-dsfr/dsfr/fonts/Marianne-Bold.woff'
const fontSource = 'public/fonts/Marianne-Regular.woff'
const fontSourceBold = 'public/fonts/Marianne-Bold.woff'
const fontFamily = 'Marianne'

Font.register({
family: fontFamily,
fonts: [
{ src: fontSource },
{ src: fontSourceBold, fontWeight: 700 },
{ src: 'node_modules/@codegouvfr/react-dsfr/dsfr/fonts/Marianne-Regular_Italic.woff', fontStyle: 'italic' },
{ src: 'node_modules/@codegouvfr/react-dsfr/dsfr/fonts/Marianne-Bold_Italic.woff', fontStyle: 'italic', fontWeight: 700 },
{ src: 'public/fonts/Marianne-Regular_Italic.woff', fontStyle: 'italic' },
{ src: 'public/fonts/Marianne-Bold_Italic.woff', fontStyle: 'italic', fontWeight: 700 },
],
})

Expand Down
2 changes: 1 addition & 1 deletion src/components/Document/numerotation/certificat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const CertificatNumerotation: React.FC<CertificatNumerotationProps> = ({ data, q
<Page size="A4" style={stylesDSFR.page}>
<View style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between' }}>
<Image src={logoAdresse} style={stylesDSFR.logoAdresse} />
<Image src={logoUrl} style={stylesDSFR.logoBloc} />
{/* <Image src={logoUrl} style={stylesDSFR.logoBloc} /> */}
</View>
<Text>{'\n'}</Text>
<View style={{ display: 'flex', flexDirection: 'column', alignItems: 'flex-end' }}>
Expand Down

0 comments on commit 1021e56

Please sign in to comment.