Skip to content

Commit

Permalink
chore: GA 연결, 일부 파일 이름 변경 (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
selfishAltruism committed Mar 11, 2024
1 parent 24351f9 commit 879c97e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 32 deletions.
7 changes: 7 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
</head>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-0MFP0WN799"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-0MFP0WN799');
</script>
<body>
<div id="root"></div>
<div id="external-root"></div>
Expand Down
23 changes: 0 additions & 23 deletions src/Tracker.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/configs/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const getRefresh = (): string | null => {
API.interceptors.response.use(
response => response,
async error => {
console.log(error);
if (error.response) {
const {
response: { data },
Expand All @@ -58,8 +57,6 @@ API.interceptors.response.use(
data.errorCode === 4103 ||
data.errorCode === '4104' ||
data.errorCode === 4104 ||
data.errorCode === '4105' ||
data.errorCode === 4105 ||
data.errorCode === '4012' ||
data.errorCode === 4012 ||
data.errorCode === '4109' ||
Expand Down
11 changes: 11 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
import { Global } from '@emotion/react';
import { createBrowserHistory } from 'history';
import React from 'react';
import { render } from 'react-dom';
import ReactGA from 'react-ga';

import { Toast } from './components';
import { GlobalStyle } from './global-styles';
import { PageRouter } from './PageRouter';
import { RootStoreProvider } from './stores/RootStore';

const gaTrackingId = import.meta.env.VITE_APP_GA_TRACKING_ID;
ReactGA.initialize(gaTrackingId);

const history = createBrowserHistory();
history.listen(location => {
ReactGA.set({ page: location.pathname }); // Update the user's current page
ReactGA.pageview(location.pathname); // Record a pageview for the given page
});

render(
<React.StrictMode>
<Global styles={GlobalStyle} />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/auth/AuthPageSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Route, Switch } from 'react-router-dom';

import { Admission } from './admission';
import { FindPassword } from './findPassword';
import { NoPermission } from './NoPermission';
import { NoPermission } from './noPermission';
import { SignIn } from './signIn';
import { SignUp } from './signUp';
import { UseTerms } from './useTerms';
Expand Down
5 changes: 0 additions & 5 deletions src/stores/repositories/UserRepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ class UserRepo {
`${this.URI}/privileged`,
)) as AxiosResponse<User.FindPrivilegedUsersResponseDto>;

/* mocking
const {
data: { councilUsers, leaderAlumni, leaderCircleUsers, leaderGradeUsers },
} = await axios.get<User.FindPrivilegedUsersResponseDto>(`${this.URI}/privileged`); */

return {
presidentUser: presidentUser.map(user => new UserModel(user)),
vicePresidentUser: vicePresidentUser.map(user => new UserModel(user)),
Expand Down

0 comments on commit 879c97e

Please sign in to comment.