Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display img from binary #25

Open
wants to merge 1 commit into
base: v1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/pages/project/Project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class Project extends React.Component<Content> {
return (
<div key={index} className='flex flex-col w-full gap-4 p-4 border-2 border-gray-700 rounded max-w-[60%] mx-auto'>
<h2 className='text-2xl font-bold text-center'>{project.titre}</h2>
<img src={project.illustration} alt={project.titre} className='w-full h-96 object-cover' />
<img src={`data:image/jpeg;base64,${project.illustration}`} alt={project.titre} className='w-full h-96 object-cover' />
<div dangerouslySetInnerHTML={{ __html: project.description }} />
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/welcome/Welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Welcome extends React.Component<Content, unknown> {
const projectstag = projects.map((project, index) => {
return (
<div key={index} className='flex flex-col items-center w-full'>
<img src={project.imageUrl} alt={project.title} />
<img src={`data:image/jpeg;base64,${project.imageUrl}`} alt={project.title} />
<h3>{project.title}</h3>
<p>{project.description}</p>
</div>
Expand Down