Skip to content

Commit

Permalink
fix: remove axios cache (#505)
Browse files Browse the repository at this point in the history
#297 

This should fix the issue we're having with CORS error with plausible.
Looks like it's a result of a caching issue with the
`axios-cache-interceptor` module.

We didn't really use this module that much since we use GraphQL for data
fetching, so we can remove it
  • Loading branch information
codemonkey800 authored Feb 23, 2024
1 parent f208407 commit 6b4d2f2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
5 changes: 0 additions & 5 deletions frontend/packages/data-portal/app/axios.ts

This file was deleted.

3 changes: 1 addition & 2 deletions frontend/packages/data-portal/app/routes/runs.$id.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

import { ShouldRevalidateFunctionArgs } from '@remix-run/react'
import { json, LoaderFunctionArgs } from '@remix-run/server-runtime'
import { AxiosResponse } from 'axios'
import axios, { AxiosResponse } from 'axios'
import { isNumber, sum } from 'lodash-es'

import { apolloClient } from 'app/apollo.server'
import { axios } from 'app/axios'
import { DownloadModal } from 'app/components/Download'
import { RunHeader } from 'app/components/Run'
import { AnnotationDrawer } from 'app/components/Run/AnnotationDrawer'
Expand Down
4 changes: 1 addition & 3 deletions frontend/packages/data-portal/app/utils/repo.server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import rehypePrism from '@mapbox/rehype-prism'
import { AxiosResponse } from 'axios'
import axios, { AxiosResponse } from 'axios'
import { readFileSync } from 'fs'
import { serialize } from 'next-mdx-remote/serialize'
import { Octokit } from 'octokit'
Expand All @@ -9,8 +9,6 @@ import sectionize from 'remark-sectionize'
import { typedjson } from 'remix-typedjson'
import { fileURLToPath } from 'url'

import { axios } from 'app/axios'

const octokit = new Octokit()

export interface RepoFile {
Expand Down

0 comments on commit 6b4d2f2

Please sign in to comment.