Skip to content

Commit

Permalink
bg component reusability fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arohanmittalUCSD committed Feb 4, 2024
1 parent 1320e44 commit 28f7fad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions frontend/src/app/BackgroundHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ import "./backgroundheader.css";

/*const styleObj = { color: "white" };*/

const BackgroundHeader = () => {
type bgProps = {
imageUrl: string;
};

const BackgroundHeader: React.FC<bgProps> = ({ imageUrl }) => {
return (
<div className="background-container">
<Image
src="/impact_bg.png"
src={imageUrl}
alt="Background image"
layout="fill"
objectFit="cover"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import WhiteCard from "./WhiteCard";
export default function Impact() {
return (
<main style={{ backgroundColor: "#F9F9F9" }}>
<BackgroundHeader />
<BackgroundHeader imageUrl="/impact_bg.png" />
{/* White Cards */}
<WhiteCard
imageUrl="/testimonials.png"
Expand Down

0 comments on commit 28f7fad

Please sign in to comment.