AddLandmark.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title> AddLandmark</title>
  7. <script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
  8. <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
  9. <script src="./build/entry.js"></script>
  10. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  11. <!--[if lt IE 9]>
  12. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  13. <![endif]-->
  14. <link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet">
  15. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
  16. <link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css">
  17. <link type="text/css" rel="stylesheet" href="styles/app.min.css">
  18. <link type="text/css" rel="stylesheet" href="styles/iframe.css">
  19. <link type="text/css" rel="stylesheet" href="">
  20. <script async defer src="https://buttons.github.io/buttons.js"></script>
  21. </head>
  22. <body class="layout small-header">
  23. <div id="stickyNavbarOverlay"></div>
  24. <div class="top-nav">
  25. <div class="inner">
  26. <a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
  27. <span aria-hidden="true"></span>
  28. <span aria-hidden="true"></span>
  29. <span aria-hidden="true"></span>
  30. </a>
  31. <div class="logo">
  32. </div>
  33. <div class="menu">
  34. <div class="navigation">
  35. <a
  36. href="index.html"
  37. class="link"
  38. >
  39. API Documentation
  40. </a>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. <div id="main">
  46. <div
  47. class="sidebar "
  48. id="sidebarNav"
  49. >
  50. <nav>
  51. <h2><a href="index.html">Documentation</a></h2><div class="category"><h3>Interfaces</h3><ul><li><a href="AddLandmarkProps.html">AddLandmarkProps</a></li><li><a href="CommentProps.html">CommentProps</a></li><li><a href="IdToken.html">IdToken</a></li><li><a href="IntroProps.html">IntroProps</a></li><li><a href="Landmark.html">Landmark</a></li><li><a href="LandmarkDetailsProps.html">LandmarkDetailsProps</a></li><li><a href="LandmarkPinProps.html">LandmarkPinProps</a></li><li><a href="LMComment.html">LMComment</a></li><li><a href="ProfileProps.html">ProfileProps</a></li><li><a href="RegisterProps.html">RegisterProps</a></li><li><a href="UserProfile.html">UserProfile</a></li></ul><h3>Components</h3><ul><li><a href="App.html">App</a></li><li><a href="Atlas.html">Atlas</a></li><li><a href="Comment.html">Comment</a></li><li><a href="PrimaryButton.html">PrimaryButton</a></li><li><a href="Profile.html">Profile</a></li><li><a href="SecondaryButton.html">SecondaryButton</a></li></ul><h3>Global</h3><ul><li><a href="global.html#IconStrings">IconStrings</a></li></ul></div><div class="category"><h2>Hooks</h2><h3>Namespaces</h3><ul><li><a href="useAuth.html">useAuth</a></li><li><a href="useLandmarks.html">useLandmarks</a></li><li><a href="useProfile.html">useProfile</a></li></ul></div><div class="category"><h2>Map</h2><h3>Interfaces</h3><ul><li><a href="UserLocation.html">UserLocation</a></li></ul><h3>Components</h3><ul><li><a href="AddLandmark.html">AddLandmark</a></li><li><a href="LandmarkDetails.html">LandmarkDetails</a></li><li><a href="LandmarkPin.html">LandmarkPin</a></li><li><a href="Map.html">Map</a></li></ul></div><div class="category"><h2>Navigation</h2><h3>Components</h3><ul><li><a href="AuthorizedNavigator.html">AuthorizedNavigator</a></li><li><a href="UnauthorizedNavigator.html">UnauthorizedNavigator</a></li></ul><h3><a href="global.html">Global</a></h3></div><div class="category"><h2>Stores</h2><h3>Classes</h3><ul><li><a href="AuthStore.html">AuthStore</a></li></ul></div><div class="category"><h2>Unauthorized</h2><h3>Components</h3><ul><li><a href="Intro.html">Intro</a></li><li><a href="UnauthorizedLayout.html">UnauthorizedLayout</a></li></ul><h3>Components / Registration</h3><ul><li><a href="RegisterMain.html">RegisterMain</a></li></ul></div>
  52. </nav>
  53. </div>
  54. <div class="core" id="main-content-wrapper">
  55. <div class="content">
  56. <header class="page-title">
  57. <p>Components</p>
  58. <h1>AddLandmark</h1>
  59. </header>
  60. <section>
  61. <header>
  62. <h2>
  63. &ltAddLandmark /&gt
  64. </h2>
  65. </header>
  66. <article>
  67. <div class="container-overview">
  68. <div class='vertical-section'>
  69. <div class="members">
  70. <div class="member">
  71. <div class=name>
  72. <span class="tag">Constructor</span>
  73. </div>
  74. <h4 class="name" id="AddLandmark">
  75. <a class="href-link" href="#AddLandmark">#</a>
  76. <span class="code-name">
  77. &ltAddLandmark /&gt
  78. </span>
  79. </h4>
  80. <div class="description">
  81. <p>Component that renders a form for adding a new <a href="Landmark.html">Landmark</a>. Contained within a <a href="https://github.com/react-native-modal/react-native-modal">react-native-modal</a>.</p>
  82. </div>
  83. <dl class="details">
  84. <p class="tag-source">
  85. <a href="src_components_AddLandmark.tsx.html" class="button">View Source</a>
  86. <span>
  87. <a href="src_components_AddLandmark.tsx.html">src/components/AddLandmark.tsx</a>, <a href="src_components_AddLandmark.tsx.html#line15">line 15</a>
  88. </span>
  89. </p>
  90. </dl>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. <div class='vertical-section'>
  96. <h1>Members</h1>
  97. <div class="members">
  98. <div class="member">
  99. <h4 class="name" id="~currentLandmarkState">
  100. <a class="href-link" href="#~currentLandmarkState">#</a>
  101. <span class='tag'>inner</span>
  102. <span class='tag'>constant</span>
  103. <span class="code-name">
  104. currentLandmarkState
  105. </span>
  106. </h4>
  107. <div class="description">
  108. <p>Holds the state of the landmark object to be added.</p>
  109. </div>
  110. <dl class="details">
  111. <p class="tag-source">
  112. <a href="src_components_AddLandmark.tsx.html" class="button">View Source</a>
  113. <span>
  114. <a href="src_components_AddLandmark.tsx.html">src/components/AddLandmark.tsx</a>, <a href="src_components_AddLandmark.tsx.html#line20">line 20</a>
  115. </span>
  116. </p>
  117. </dl>
  118. </div>
  119. </div>
  120. </div>
  121. <div class='vertical-section'>
  122. <h1>Methods</h1>
  123. <div class="members">
  124. <div class="member">
  125. <h4 class="name" id=".resetAddMutationOnSuccess">
  126. <a class="href-link" href="#.resetAddMutationOnSuccess">#</a>
  127. <span class='tag'>static</span>
  128. <span class="code-name">
  129. resetAddMutationOnSuccess<span class="signature">()</span><span class="type-signature"></span>
  130. </span>
  131. </h4>
  132. <div class="description">
  133. <p>Resets the addLandmarkAsync mutation on successful add.
  134. Embedded in a useEffect that listens to the addLandmarkStatus value from the <a href="useLandmarks.html">useLandmarks</a> hook.</p>
  135. </div>
  136. <dl class="details">
  137. <p class="tag-source">
  138. <a href="src_components_AddLandmark.tsx.html" class="button">View Source</a>
  139. <span>
  140. <a href="src_components_AddLandmark.tsx.html">src/components/AddLandmark.tsx</a>, <a href="src_components_AddLandmark.tsx.html#line38">line 38</a>
  141. </span>
  142. </p>
  143. </dl>
  144. </div>
  145. <div class="member">
  146. <h4 class="name" id=".updateLandmarkStateFromParent">
  147. <a class="href-link" href="#.updateLandmarkStateFromParent">#</a>
  148. <span class='tag'>static</span>
  149. <span class="code-name">
  150. updateLandmarkStateFromParent<span class="signature">()</span><span class="type-signature"></span>
  151. </span>
  152. </h4>
  153. <div class="description">
  154. <p>Updates this component's <code>currentLandmarkState</code> when the <code>landmark</code> prop passed down from the parent <a href="Map.html">Map</a>'s <code>newLandmark</code> is changed.
  155. Embedded in a useEffect that listens to the <code>landmark</code> prop.</p>
  156. </div>
  157. <dl class="details">
  158. <p class="tag-source">
  159. <a href="src_components_AddLandmark.tsx.html" class="button">View Source</a>
  160. <span>
  161. <a href="src_components_AddLandmark.tsx.html">src/components/AddLandmark.tsx</a>, <a href="src_components_AddLandmark.tsx.html#line28">line 28</a>
  162. </span>
  163. </p>
  164. </dl>
  165. </div>
  166. <div class="member">
  167. <h4 class="name" id="~close">
  168. <a class="href-link" href="#~close">#</a>
  169. <span class='tag'>inner</span>
  170. <span class="code-name">
  171. close<span class="signature">()</span><span class="type-signature"></span>
  172. </span>
  173. </h4>
  174. <div class="description">
  175. <p>Closes the modal.</p>
  176. </div>
  177. <dl class="details">
  178. <p class="tag-source">
  179. <a href="src_components_AddLandmark.tsx.html" class="button">View Source</a>
  180. <span>
  181. <a href="src_components_AddLandmark.tsx.html">src/components/AddLandmark.tsx</a>, <a href="src_components_AddLandmark.tsx.html#line55">line 55</a>
  182. </span>
  183. </p>
  184. </dl>
  185. </div>
  186. <div class="member">
  187. <h4 class="name" id="~submit">
  188. <a class="href-link" href="#~submit">#</a>
  189. <span class='tag'>async</span>
  190. <span class='tag'>inner</span>
  191. <span class="code-name">
  192. submit<span class="signature">()</span><span class="type-signature"></span>
  193. </span>
  194. </h4>
  195. <div class="description">
  196. <p>Calls addLandmarkAsync from <a href="useLandmarks.html">useLandmarks</a> to initate the process of adding a landmark, then closes the modal.</p>
  197. </div>
  198. <dl class="details">
  199. <p class="tag-source">
  200. <a href="src_components_AddLandmark.tsx.html" class="button">View Source</a>
  201. <span>
  202. <a href="src_components_AddLandmark.tsx.html">src/components/AddLandmark.tsx</a>, <a href="src_components_AddLandmark.tsx.html#line48">line 48</a>
  203. </span>
  204. </p>
  205. </dl>
  206. </div>
  207. </div>
  208. </div>
  209. </article>
  210. </section>
  211. </div>
  212. <footer class="footer">
  213. <div class="content has-text-centered">
  214. <p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a></p>
  215. <p class="sidebar-created-by">
  216. <a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
  217. <a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
  218. </p>
  219. </div>
  220. </footer>
  221. </div>
  222. <div id="side-nav" class="side-nav">
  223. </div>
  224. </div>
  225. <script src="scripts/app.min.js"></script>
  226. <script>PR.prettyPrint();</script>
  227. <script src="scripts/linenumber.js"> </script>
  228. </body>
  229. </html>