11import { PolicyContent } from "./PolicyContent"
22import { Button , Stack , Container , Image , Row , Col } from "react-bootstrap"
3+ import { ButtonHTMLAttributes , useEffect , useState } from "react"
34import style from "./PolicyPage.module.css"
45import Router from "next/router"
56import classNames from "classnames"
6- import { useTranslation } from "next-i18next"
77
8- const policies = [ "privacy-policy " , "copyright " , "code-of-conduct" ] as const
8+ const policies = [ "copyright " , "privacy-policy " , "code-of-conduct" ] as const
99export type Policy = ( typeof policies ) [ number ]
1010
1111export default function PolicyPage ( {
1212 policy = "privacy-policy"
1313} : {
1414 policy ?: Policy
1515} ) {
16- const { t } = useTranslation ( "policies" )
16+ const handleOnClick = ( p : Policy ) => {
17+ Router . push ( `/policies/${ p } ` )
18+ }
19+
1720 return (
1821 < Container fluid className = { style . policyContent } >
19- < h1 > { t ( "title" ) } </ h1 >
22+ < h1 > Policies </ h1 >
2023 < Stack direction = "horizontal" >
21- { policies . map ( p => (
22- < Button
23- className = { `${ style [ policy === p ? "currentTab" : "tab" ] } ` }
24- id = { p }
25- key = { p }
26- onClick = { ( ) => Router . push ( `/policies/${ p } ` ) }
27- >
28- { t ( `tabs.${ p } ` ) }
29- </ Button >
30- ) ) }
24+ < Button
25+ className = { `${
26+ style [ policy === "privacy-policy" ? "currentTab" : "tab" ]
27+ } `}
28+ id = "privacy-policy"
29+ onClick = { e => handleOnClick ( "privacy-policy" ) }
30+ >
31+ Privacy < br /> Policy
32+ </ Button >
33+ < Button
34+ className = { `${ style [ policy === "copyright" ? "currentTab" : "tab" ] } ` }
35+ id = "copyright"
36+ onClick = { e => handleOnClick ( "copyright" ) }
37+ >
38+ Terms of Service < br />
39+ </ Button >
40+
41+ < Button
42+ className = { `${
43+ style [ policy === "code-of-conduct" ? "currentTab" : "tab" ]
44+ } `}
45+ id = "code-of-conduct"
46+ onClick = { e => handleOnClick ( "code-of-conduct" ) }
47+ >
48+ Code of < br /> Conduct
49+ </ Button >
3150 </ Stack >
3251
3352 < PolicyContent policy = { policy } />
3453
3554 < div className = { style . sharedValues } >
36- < p className = { style . subHeading } > { t ( "values.heading" ) } </ p >
55+ < p className = { style . subHeading } > Our Shared Values </ p >
3756 < hr className = { style . bottomBorder } > </ hr >
38- < p className = { style . text1 } > { t ( "values.description1" ) } </ p >
39- < p className = { style . text2 } > { t ( "values.description2" ) } </ p >
57+ < p className = { style . text1 } >
58+ How we interact with each other determines what we can accomplish
59+ </ p >
60+ < p className = { style . text2 } > On this website, we ask you to act with:</ p >
4061 </ div >
4162
4263 < Container fluid >
@@ -50,19 +71,19 @@ export default function PolicyPage({
5071 >
5172 < Col xs = { 12 } className = { style . blueBox } >
5273 < Image src = "/handShake.jpg" alt = "" className = { style . symbol } > </ Image >
53- < p className = { style . values } > { t ( "values.humility" ) } </ p >
74+ < p className = { style . values } > Humility </ p >
5475 </ Col >
5576 < Col xs = { 12 } className = { style . blueBox } >
5677 < Image
5778 src = "/compassion.png"
5879 alt = ""
5980 className = { style . symbol }
6081 > </ Image >
61- < p className = { style . values } > { t ( "values.compassion" ) } </ p >
82+ < p className = { style . values } > Compassion </ p >
6283 </ Col >
6384 < Col xs = { 12 } className = { style . blueBox } >
6485 < Image src = "/lightBulb.png" alt = "" className = { style . symbol } > </ Image >
65- < p className = { style . values } > { t ( "values.curiosity" ) } </ p >
86+ < p className = { style . values } > Curiosity </ p >
6687 </ Col >
6788 </ Row >
6889 </ Container >
0 commit comments