Skip to content

Commit e0398a6

Browse files
Onetrust cookie banner (#1354)
* onetrust cookie banner implementation & styles * onetrust cookie banner implementation & styles * PR #1332 feedback * onetrust production script * Onetrust cookie banner Segment config * onetrust cookie banner: remove unused cookie-settings.md and gdpr-banner.md files
1 parent e3c9f26 commit e0398a6

File tree

20 files changed

+333
-693
lines changed

20 files changed

+333
-693
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/breadCrumbs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const BreadCrumbs = ({ slug, menu }) => {
6868
}
6969

7070
// Then, we add a couple pages that don't need breadcrumbs, such as /menu, /index, etc.
71-
filesToExclude.push("index", "gdpr-banner", "menu", "cookie-settings");
71+
filesToExclude.push("index", "menu");
7272

7373
// Now, we throw the error if any page that's not on the filesToExclude array is missing in menu.md
7474
if (path.length === 0 && !filesToExclude.includes(slug[0])) {

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)