Skip to content

Commit

Permalink
refactor: utils/api 사용 리팩토링
Browse files Browse the repository at this point in the history
  • Loading branch information
ArpaAP committed Oct 8, 2024
1 parent 6cf8d27 commit d632ca4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/Board.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Text } from '../components/typograph/Text';
import { useEffect, useState } from 'react';
import axios from 'axios';
import urlJoin from 'url-join';
import { API } from '../utils/api';

const Container = styled.div`
width: 100%;
Expand Down Expand Up @@ -106,7 +107,7 @@ export default function Board() {
const [tag, setTag] = useState('전체');

useEffect(() => {
axios.get(urlJoin(import.meta.env.BACKEND_URL, '/posts')).then((r) => {
API.GET('/posts').then((r) => {
setPosts(r.data);
});
}, []);
Expand Down

0 comments on commit d632ca4

Please sign in to comment.