@@ -30,8 +30,6 @@ import Spinner from "../../components/Spinner"
3030import { CopyIconButton } from "../../components/CopyButton"
3131import { QueryResponse , APIStatus } from "./useDataAPIRequest"
3232import TSVDownload from "./TSVDownload"
33- import LabeledCheckbox from "../LabeledCheckbox"
34- import { useState } from "react"
3533
3634const useStyles = makeStyles ( theme => ( {
3735 paper : { } ,
@@ -93,17 +91,14 @@ interface ReportProps {
9391 queryResponse : QueryResponse
9492 columns : gapi . client . analytics . Column [ ] | undefined
9593 permalink : string | undefined
96- accessToken : string | undefined
9794}
9895
9996const Report : React . FC < ReportProps > = ( {
10097 queryResponse,
10198 columns,
10299 permalink,
103- accessToken,
104100} ) => {
105101 const classes = useStyles ( )
106- const [ includeAccessToken , setIncludeAccessToken ] = useState ( false )
107102
108103 const requestURL = React . useMemo ( ( ) => {
109104 if (
@@ -115,14 +110,11 @@ const Report: React.FC<ReportProps> = ({
115110 const [ base , queryParamString ] = queryResponse . response . selfLink ! . split ( "?" )
116111 const existingQueryParams = new URLSearchParams ( queryParamString )
117112 const nuQueryParams = new URLSearchParams ( )
118- if ( includeAccessToken && accessToken !== undefined ) {
119- nuQueryParams . append ( "access_token" , accessToken )
120- }
121113 existingQueryParams . forEach ( ( value , key ) => {
122114 nuQueryParams . append ( key , value )
123115 } )
124116 return `${ base } ?${ nuQueryParams . toString ( ) } `
125- } , [ queryResponse , includeAccessToken , accessToken ] )
117+ } , [ queryResponse ] )
126118
127119 if ( queryResponse === undefined ) {
128120 return null
@@ -181,12 +173,6 @@ const Report: React.FC<ReportProps> = ({
181173 ) ,
182174 } }
183175 />
184- < LabeledCheckbox
185- checked = { includeAccessToken }
186- setChecked = { setIncludeAccessToken }
187- >
188- include access token
189- </ LabeledCheckbox >
190176 < section className = { classes . reportLink } >
191177 < a href = { permalink } > Link to this report</ a >
192178 </ section >
0 commit comments