-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Andi-IM/feature/only_me
updating layout for suggestions.
- Loading branch information
Showing
4 changed files
with
194 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,14 @@ | ||
import { Col, Image, Modal, Row } from "antd"; | ||
import DataDetailSuggestion from "./DataDetailSuggestion"; | ||
import {Col, Image, Modal, Row} from "antd"; | ||
|
||
const ModalDetailImgSuggestion = ({ open, setOpen, objDetailImg }) => { | ||
return ( | ||
<Modal open={open} onCancel={() => setOpen(false)} title="Deskripsi Foto"> | ||
<Row gutter={16} align="middle"> | ||
<Col span={12}> | ||
<Image /> | ||
</Col> | ||
<Col span={12}> | ||
<DataDetailSuggestion | ||
label="Description" | ||
value={objDetailImg?.description} | ||
/> | ||
<DataDetailSuggestion | ||
label="Attribution" | ||
value={objDetailImg?.attribution} | ||
/> | ||
</Col> | ||
</Row> | ||
</Modal> | ||
); | ||
const ModalDetailImgSuggestion = ({open, setOpen, objDetailImg}) => { | ||
return ( | ||
<Modal open={open} onCancel={() => setOpen(false)} title="Deskripsi Foto"> | ||
<Row gutter={16} align="middle"> | ||
<Col span={12}> | ||
<Image src={objDetailImg?.url}/> | ||
</Col> | ||
</Row> | ||
</Modal> | ||
); | ||
}; | ||
export default ModalDetailImgSuggestion; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {getFunctions, httpsCallable} from "firebase/functions"; | ||
import {message} from "antd"; | ||
|
||
const getUserById = async (id) => { | ||
try { | ||
const functions = getFunctions(); | ||
const request = httpsCallable(functions, 'getUserById'); | ||
return await request({userId: id}); | ||
} catch (error) { | ||
// Getting the Error details. | ||
return message.error({ | ||
content: `Error! : ${error.message}` | ||
}) | ||
} | ||
} | ||
|
||
export default getUserById; |
Oops, something went wrong.