Skip to content

Commit 671f55f

Browse files
Onetrust gdpr banner (#1361)
* onetrust gdpr cookie consent banner * onetrust cookie banner - spa support * onetrust cookie banner - scripts order fix
1 parent 4bbcb71 commit 671f55f

19 files changed

+302
-637
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ To add, edit, or delete content in our documentation, you have to modify Markdow
7070
- `kb/` Contains `.md` files that populate the Knowledge Base.
7171
- `library/` Contains `.md` files that populate the Streamlit Library section.
7272
- `streamlit-cloud/`Contains `.md` files that populate the Streamlit Community Cloud section.
73-
- `gdpr-banner.md` You'll never have to edit this file.
7473
- `index.md` Contains text that populates the index page.
7574
- `menu.md` This is a special file containing only front matter that defines the docs Menu. You will need to add an entry on this file for each new page you create within the docs' site.
7675

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const CookiePolicyButton = ({ children, className, ...props }) => {
2+
const classes = `ot-sdk-show-settings${className ? ` ${className}` : ""}`;
3+
4+
return (
5+
<button className={classes} {...props}>
6+
{children}
7+
</button>
8+
);
9+
};
10+
11+
export default CookiePolicyButton;

components/navigation/footer.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import Link from "next/link";
2+
import dynamic from "next/dynamic";
23

34
import styles from "./footer.module.css";
45

5-
const Footer = ({ setIsTelemetryModalVisible }) => {
6+
const CookiePolicyButton = dynamic(() => import("./cookiePolicyButton"), {
7+
ssr: false,
8+
});
9+
10+
const Footer = () => {
611
return (
712
<footer className={styles.Container}>
813
<section className={styles.InnerContainer}>
@@ -181,12 +186,9 @@ const Footer = ({ setIsTelemetryModalVisible }) => {
181186
</section>
182187
<div className={styles.Copyright}>
183188
<span>&copy; {new Date().getFullYear()} Snowflake Inc.</span>
184-
<button
185-
className="hover:opacity-80 ml-2"
186-
onClick={() => setIsTelemetryModalVisible(true)}
187-
>
189+
<CookiePolicyButton className="hover:opacity-80 ml-2">
188190
Cookie policy
189-
</button>
191+
</CookiePolicyButton>
190192
</div>
191193
</section>
192194
</footer>

components/utilities/cookieSettingsModal.js

Lines changed: 0 additions & 73 deletions
This file was deleted.

components/utilities/cookieSettingsModal.module.css

Lines changed: 0 additions & 167 deletions
This file was deleted.

0 commit comments

Comments
 (0)