Skip to content

Commit

Permalink
fix: use new segment endpoint (#1419)
Browse files Browse the repository at this point in the history
The list of segments now comes from the new ads manager endpoint, that
always returns just text classifier segments, so all users now see the
same list.

Re brave/ads-serve#3935

Depends on brave/ads-serve#4552
  • Loading branch information
tackley authored Dec 20, 2024
1 parent 809aca9 commit 1a6365e
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/Segment/SegmentPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface Props {

export const SegmentPicker = ({ idx }: Props) => {
const { data } = useQuery(SegmentsDocument);
const activeSegments = [...(data?.segments?.data ?? [])]
const activeSegments = [...(data?.adsManagerSegments ?? [])]
.filter((s) => s.code !== "Svp7l-zGN")
.sort((a, b) => {
return a.name.toLowerCase().localeCompare(b.name.toLowerCase());
Expand Down
4 changes: 2 additions & 2 deletions src/graphql-client/gql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1a6365e

Please sign in to comment.