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

Fix the sample app privacy center link to be configurable #3409

Merged
merged 2 commits into from
May 31, 2023
Merged
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
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