|
@@ -1,4 +1,3 @@
|
|
|
-import {useEffect} from 'react';
|
|
|
import {browserHistory} from 'react-router';
|
|
|
import styled from '@emotion/styled';
|
|
|
|
|
@@ -13,27 +12,11 @@ import useOrganization from 'sentry/utils/useOrganization';
|
|
|
import usePageFilters from 'sentry/utils/usePageFilters';
|
|
|
import ReplaySearchBar from 'sentry/views/replays/replaySearchBar';
|
|
|
|
|
|
-const DEFAULT_QUERY = 'duration:>=5';
|
|
|
-
|
|
|
function ReplaysFilters() {
|
|
|
const {selection} = usePageFilters();
|
|
|
const {pathname, query} = useLocation();
|
|
|
const organization = useOrganization();
|
|
|
|
|
|
- useEffect(() => {
|
|
|
- if (query.query === undefined) {
|
|
|
- // Set default query into url if there is no query set
|
|
|
- browserHistory.replace({
|
|
|
- pathname,
|
|
|
- query: {
|
|
|
- ...query,
|
|
|
- cursor: undefined,
|
|
|
- query: DEFAULT_QUERY,
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
return (
|
|
|
<FilterContainer>
|
|
|
<PageFilterBar condensed>
|
|
@@ -44,8 +27,8 @@ function ReplaysFilters() {
|
|
|
<ReplaySearchBar
|
|
|
organization={organization}
|
|
|
pageFilters={selection}
|
|
|
- defaultQuery={DEFAULT_QUERY}
|
|
|
- query={decodeScalar(query.query, DEFAULT_QUERY)}
|
|
|
+ defaultQuery=""
|
|
|
+ query={decodeScalar(query.query, '')}
|
|
|
onSearch={searchQuery => {
|
|
|
browserHistory.push({
|
|
|
pathname,
|