Skip to content

Commit

Permalink
Merge pull request #58 from Minjae-An/feature/#57
Browse files Browse the repository at this point in the history
Feature/#57
  • Loading branch information
soz1p authored Jul 27, 2023
2 parents f09154e + b17ab80 commit a7a7b6e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cockpybara/src/main/frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ function App() {
<Route path="/user/{userId}/my-page" element={<MyPage />} />
<Route path="/user/my-recipe" element={<AddRecipe/>} />
<Route path="/recipe/detail/{cocktailId}" element={<RecipeDetail/>} />
<Route path="/community" element={<Community/>} />
</Routes>
</div>
);
Expand Down
28 changes: 25 additions & 3 deletions Cockpybara/src/main/frontend/src/Community.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
import React from 'react';
import React, { useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import axios from 'axios';

const Community = () => {
const navigate = useNavigate();


const handleMyPageButtonClick = () => {
// Navigate to the MyPage component when the button is clicked
navigate('/user/{userId}/my-page');
};



return (
<div>
<h1>Page 3_메뉴</h1>
<div style={{ backgroundColor: 'skyblue' }}>
<h2>MY 커뮤니티</h2>

<button onClick={handleMyPageButtonClick}>마이 페이지로 이동</button>
</div>
<div style={{ backgroundColor: 'pink' }}>
<h2>월간 인기</h2>
</div>
<div style={{ backgroundColor: 'lightgreen' }}>
<h2>칵테일 나열</h2>
</div>
</div>
);
};

export default Community;
export default Community;

0 comments on commit a7a7b6e

Please sign in to comment.