File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
- import React from 'react' ;
1
+ import React , { useEffect } from 'react' ;
2
2
import MainTemplate from '../../components/main/MainTemplate' ;
3
3
import Header from '../../components/base/Header' ;
4
4
import HomeTab from '../../components/home/HomeTab' ;
@@ -12,7 +12,9 @@ import FloatingHeader from '../../components/base/FloatingHeader';
12
12
export type HomePageProps = { } ;
13
13
14
14
function HomePage ( props : HomePageProps ) {
15
- window . location . href = process . env . REACT_APP_CLIENT_V3_HOST ! ;
15
+ useEffect ( ( ) => {
16
+ window . location . href = process . env . REACT_APP_CLIENT_V3_HOST ! ;
17
+ } , [ ] ) ;
16
18
return (
17
19
< MainTemplate >
18
20
< Header />
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
1
+ import React , { useEffect } from 'react' ;
2
2
import styled from 'styled-components' ;
3
3
import VelogResponsive from '../../components/velog/VelogResponsive' ;
4
4
import UserProfileContainer from '../../containers/velog/UserProfileContainer' ;
@@ -18,8 +18,10 @@ export interface UserPageProps
18
18
19
19
const UserPage : React . FC < UserPageProps > = ( { match, location } ) => {
20
20
const { username, tab } = match . params ;
21
- window . location . href = `${ process . env
22
- . REACT_APP_CLIENT_V3_HOST ! } /@${ username } /posts`;
21
+ useEffect ( ( ) => {
22
+ window . location . href = `${ process . env
23
+ . REACT_APP_CLIENT_V3_HOST ! } /@${ username } /posts`;
24
+ } , [ ] ) ;
23
25
24
26
return (
25
27
< UserPageBlock >
You can’t perform that action at this time.
0 commit comments