Skip to content

Commit

Permalink
Merge pull request #219 from SWE574-Fall2023-Group1/feature/215-edit-…
Browse files Browse the repository at this point in the history
…story-button

Update edit Story button name #215
  • Loading branch information
ckertam authored Dec 4, 2023
2 parents e6ff4ed + 35b52f8 commit dd2266b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/frontend/src/pages/story/EditStory.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import StoryMap from './StoryMap';
import TagSearch from './TagSearch'; // Adjust the path as needed
import Chip from '@mui/material/Chip';

let postHeader = null;

function EditStory() {

const { storyId } = useParams(); // Get story ID from URL
const isEditMode = storyId != null;

const postHeader = 'Edit Memory';
const postButton = 'Update Memory';

const [title, setTitle] = useState('');
const [content, setContent] = useState('');
Expand Down Expand Up @@ -578,7 +578,7 @@ const parseLocation = (location) => {
/>
</div>
<br/>
<Button style={{borderRadius: 10, backgroundColor: "#7E49FF", padding: "12px 28px", fontSize: "24px"}} variant="contained" onClick={handleSubmit} className="btn btn-primary middle">{postHeader}</Button>
<Button style={{borderRadius: 10, backgroundColor: "#7E49FF", padding: "12px 28px", fontSize: "24px"}} variant="contained" onClick={handleSubmit} className="btn btn-primary middle">{postButton}</Button>
<br/>
<br/>
<text>You can edit your memory as many times as you want after posting.</text>
Expand Down

0 comments on commit dd2266b

Please # to comment.