Skip to content

Commit

Permalink
Fix the sample app privacy center link to be configurable (#3409)
Browse files Browse the repository at this point in the history
  • Loading branch information
NevilleS authored May 31, 2023
1 parent fbf9c2c commit 5fbd71d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The types of changes are:

- Fix sample app `DATABASE_*` ENV vars for backwards compatibility [#3406](https://github.com/ethyca/fides/pull/3406)
- Fix overlay rendering issue by finding/creating a dedicated parent element for Preact [#3397](https://github.com/ethyca/fides/pull/3397)
- Fix the sample app privacy center link to be configurable [#3409](https://github.com/ethyca/fides/pull/3409)

### Changed

Expand Down
5 changes: 3 additions & 2 deletions clients/sample-app/src/components/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import PurchaseModal from "../PurchaseModal";
import css from "./style.module.scss";

interface Props {
privacyCenterUrl: string;
products: Product[];
}

const Home = ({ products }: Props) => {
const Home = ({ privacyCenterUrl, products }: Props) => {
const [productInPurchase, setProductInPurchase] = useState<Product | null>(
null
);
Expand Down Expand Up @@ -62,7 +63,7 @@ const Home = ({ products }: Props) => {
</main>
<footer className={css.footer}>
<div>
<a href="http://localhost:3001">
<a href={privacyCenterUrl}>
Do not sell or share my personal information
</a>
</div>
Expand Down
1 change: 1 addition & 0 deletions clients/sample-app/src/components/Home/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
padding-top: 2em;
padding-bottom: 2em;

a,
a:visited,
a:hover {
color: #5b301d;
Expand Down
2 changes: 1 addition & 1 deletion clients/sample-app/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const IndexPage = ({ gtmContainerId, privacyCenterUrl, products }: Props) => {
}
`}
</Script>
<Home products={products} />
<Home privacyCenterUrl={privacyCenterUrl} products={products} />
</>
);
};
Expand Down

0 comments on commit 5fbd71d

Please sign in to comment.