Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgazer committed Nov 27, 2023
1 parent a00a501 commit c23cf24
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions resq/frontend/src/components/Resource/ResourceAddress.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function CreateResourceForm() {
latitude: parseFloat(latitudeValue),
});
};

/*
const handleChange = (event) => {
const { name, value } = event.target;
setResource(prevState => ({
Expand All @@ -51,7 +51,7 @@ export default function CreateResourceForm() {
const handleSubmit = (event) => {
event.preventDefault();
console.log(resource);
};
};*/

return (
<ThemeProvider theme={customTheme}>
Expand Down
2 changes: 1 addition & 1 deletion resq/frontend/src/components/Resource/ResourceContext.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { createContext, useState, useContext } from 'react';

const ResourceContext = createContext();
export const ResourceContext = createContext({});

export const useResource = () => useContext(ResourceContext);

Expand Down
3 changes: 1 addition & 2 deletions resq/frontend/src/pages/ResourceCreation.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import ResourceAddress from '../components/Resource/ResourceAddress';
import ResourceDetail1 from '../components/Resource/ResourceDetail1';
import ResourceDetail2 from '../components/Resource/ResourceDetail2';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import { ResourceProvider } from '../components/Resource/ResourceContext';
import { useResource } from './ResourceContext';
import {ResourceProvider, useResource} from '../components/Resource/ResourceContext';
import axios from 'axios';


Expand Down

0 comments on commit c23cf24

Please sign in to comment.