Skip to content

Commit

Permalink
Merge pull request #1286 from brave/master
Browse files Browse the repository at this point in the history
Production Release 2024-07-31
  • Loading branch information
IanKrieger authored Jul 31, 2024
2 parents da333b4 + 03afbcf commit 20f91db
Show file tree
Hide file tree
Showing 11 changed files with 502 additions and 527 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13
uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13
uses: github/codeql-action/autobuild@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +67,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13
uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.15.1
20.16.0
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"private": true,
"type": "module",
"dependencies": {
"@apollo/client": "3.10.8",
"@emotion/react": "11.12.0",
"@emotion/styled": "11.12.0",
"@apollo/client": "3.11.1",
"@emotion/react": "11.13.0",
"@emotion/styled": "11.13.0",
"@fontsource/inter": "5.0.19",
"@fontsource/mulish": "5.0.18",
"@fontsource/poppins": "5.0.14",
Expand All @@ -18,11 +18,11 @@
"@lingui/format-po": "4.11.2",
"@lingui/macro": "4.11.2",
"@lingui/react": "4.11.2",
"@mui/icons-material": "5.16.4",
"@mui/lab": "5.0.0-alpha.172",
"@mui/material": "5.16.4",
"@mui/x-data-grid": "7.11.0",
"@mui/x-date-pickers": "7.11.0",
"@mui/icons-material": "5.16.5",
"@mui/lab": "5.0.0-alpha.173",
"@mui/material": "5.16.5",
"@mui/x-data-grid": "7.11.1",
"@mui/x-date-pickers": "7.11.1",
"bignumber.js": "9.1.2",
"dayjs": "1.11.12",
"formik": "2.4.6",
Expand Down Expand Up @@ -82,17 +82,17 @@
"eslint-plugin-lingui": "0.3.0",
"eslint-plugin-react": "7.35.0",
"eslint-plugin-react-hooks": "4.6.2",
"husky": "9.1.1",
"knip": "5.26.0",
"husky": "9.1.3",
"knip": "5.27.0",
"lint-staged": "15.2.7",
"npm-run-all2": "6.2.2",
"prettier": "3.3.3",
"typescript": "5.5.3",
"typescript-eslint": "7.16.1",
"vite": "5.3.4",
"typescript": "5.5.4",
"typescript-eslint": "7.17.0",
"vite": "5.3.5",
"vite-plugin-checker": "0.7.2",
"vite-tsconfig-paths": "4.3.2",
"vitest": "2.0.3"
"vitest": "2.0.4"
},
"engines": {
"node": ">=20",
Expand Down
715 changes: 295 additions & 420 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

22 changes: 13 additions & 9 deletions src/components/Datagrid/renderers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import BigNumber from "bignumber.js";
import { Trans } from "@lingui/macro";
import dayjs from "dayjs";
import { useMutation } from "@apollo/client";
import { UpdateAdSetDocument } from "@/graphql-client/graphql";
import { graphql } from "@/graphql-client/index";

type CellValueRenderer = (value: any) => ReactNode;
const ADS_DEFAULT_TIMEZONE = "America/New_York";
Expand Down Expand Up @@ -120,14 +120,20 @@ export function adSetOnOffState(
c: Omit<UpdateAdSetInput, "ads"> & {
campaignStart: string;
campaignEnd: string;
campaignId: string;
campaignState: string;
campaignSource: CampaignSource;
advertiserId: string;
},
isInline?: boolean,
): ReactNode {
const [updateAdSet, { loading }] = useMutation(UpdateAdSetDocument, {
const UpdateAdSetState = graphql(`
mutation UpdateAdSetState($id: String!, $state: AdSetState!) {
adsManagerUpdateAdSetState(id: $id, state: $state) {
id
}
}
`);

const [updateAdSet, { loading }] = useMutation(UpdateAdSetState, {
refetchQueries: [
{
query: LoadCampaignAdsDocument,
Expand All @@ -145,13 +151,11 @@ export function adSetOnOffState(
<OnOff
onChange={(s) => {
{
if (!c.id) return;
updateAdSet({
variables: {
updateAdSetInput: {
state: s as AdSetState,
id: c.id,
campaignId: c.campaignId,
},
state: s as AdSetState,
id: c.id,
},
});
}
Expand Down
9 changes: 7 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 20f91db

Please sign in to comment.