LandmarkDetails.html 18 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111
  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> LandmarkDetails</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>LandmarkDetails</h1>
  59. </header>
  60. <section>
  61. <header>
  62. <h2>
  63. &ltLandmarkDetails /&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="LandmarkDetails">
  75. <a class="href-link" href="#LandmarkDetails">#</a>
  76. <span class="code-name">
  77. &ltLandmarkDetails /&gt
  78. </span>
  79. </h4>
  80. <div class="description">
  81. <p>Component that renders the details of a selected <a href="Landmark.html">Landmark</a> and allows the user to edit those details. 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_LandmarkDetails.tsx.html" class="button">View Source</a>
  86. <span>
  87. <a href="src_components_LandmarkDetails.tsx.html">src/components/LandmarkDetails.tsx</a>, <a href="src_components_LandmarkDetails.tsx.html#line22">line 22</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="~renderComment">
  100. <a class="href-link" href="#~renderComment">#</a>
  101. <span class='tag'>inner</span>
  102. <span class='tag'>constant</span>
  103. <span class="code-name">
  104. renderComment
  105. </span>
  106. </h4>
  107. <div class="description">
  108. <p>Renders all <a href="LMComment.html">comments</a> associated with the <code>selectedLandmark</code> as items for the <a href="https://reactnative.dev/docs/flatlist">FlatList</a> in this component.</p>
  109. </div>
  110. <dl class="details">
  111. <p class="tag-source">
  112. <a href="src_components_LandmarkDetails.tsx.html" class="button">View Source</a>
  113. <span>
  114. <a href="src_components_LandmarkDetails.tsx.html">src/components/LandmarkDetails.tsx</a>, <a href="src_components_LandmarkDetails.tsx.html#line103">line 103</a>
  115. </span>
  116. </p>
  117. </dl>
  118. </div>
  119. <div class="member">
  120. <h4 class="name" id="~selectedLandmarkState">
  121. <a class="href-link" href="#~selectedLandmarkState">#</a>
  122. <span class='tag'>inner</span>
  123. <span class='tag'>constant</span>
  124. <span class="code-name">
  125. selectedLandmarkState
  126. </span>
  127. </h4>
  128. <div class="description">
  129. <p>Holds the state of the <a href="Landmark.html">Landmark</a> being displayed.</p>
  130. </div>
  131. <dl class="details">
  132. <p class="tag-source">
  133. <a href="src_components_LandmarkDetails.tsx.html" class="button">View Source</a>
  134. <span>
  135. <a href="src_components_LandmarkDetails.tsx.html">src/components/LandmarkDetails.tsx</a>, <a href="src_components_LandmarkDetails.tsx.html#line26">line 26</a>
  136. </span>
  137. </p>
  138. </dl>
  139. </div>
  140. <div class="member">
  141. <h4 class="name" id="~updatedLandmarkState">
  142. <a class="href-link" href="#~updatedLandmarkState">#</a>
  143. <span class='tag'>inner</span>
  144. <span class='tag'>constant</span>
  145. <span class="code-name">
  146. updatedLandmarkState
  147. </span>
  148. </h4>
  149. <div class="description">
  150. <p>Holds state of a <a href="Landmark.html">Landmark</a> object parallel to <code>selectedLandmarkState</code> that is manipulated when <code>editingEnabled</code> is true.</p>
  151. </div>
  152. <dl class="details">
  153. <p class="tag-source">
  154. <a href="src_components_LandmarkDetails.tsx.html" class="button">View Source</a>
  155. <span>
  156. <a href="src_components_LandmarkDetails.tsx.html">src/components/LandmarkDetails.tsx</a>, <a href="src_components_LandmarkDetails.tsx.html#line31">line 31</a>
  157. </span>
  158. </p>
  159. </dl>
  160. </div>
  161. </div>
  162. </div>
  163. <div class='vertical-section'>
  164. <h1>Methods</h1>
  165. <div class="members">
  166. <div class="member">
  167. <h4 class="name" id=".resetDeleteMutationOnSuccess">
  168. <a class="href-link" href="#.resetDeleteMutationOnSuccess">#</a>
  169. <span class='tag'>static</span>
  170. <span class="code-name">
  171. resetDeleteMutationOnSuccess<span class="signature">()</span><span class="type-signature"></span>
  172. </span>
  173. </h4>
  174. <div class="description">
  175. <p>Resets the <code>deleteLandmark</code> mutation on successful delete.
  176. Embedded in a useEffect that listens to the <code>deleteLandmarkStatus</code> value from the <a href="useLandmarks.html">useLandmarks</a> hook.</p>
  177. </div>
  178. <dl class="details">
  179. <p class="tag-source">
  180. <a href="src_components_LandmarkDetails.tsx.html" class="button">View Source</a>
  181. <span>
  182. <a href="src_components_LandmarkDetails.tsx.html">src/components/LandmarkDetails.tsx</a>, <a href="src_components_LandmarkDetails.tsx.html#line65">line 65</a>
  183. </span>
  184. </p>
  185. </dl>
  186. </div>
  187. <div class="member">
  188. <h4 class="name" id=".resetUpdateMutationOnSuccess">
  189. <a class="href-link" href="#.resetUpdateMutationOnSuccess">#</a>
  190. <span class='tag'>static</span>
  191. <span class="code-name">
  192. resetUpdateMutationOnSuccess<span class="signature">()</span><span class="type-signature"></span>
  193. </span>
  194. </h4>
  195. <div class="description">
  196. <p>Resets the <code>updateLandmark</code> mutation on successful add.
  197. Embedded in a useEffect that listens to the <code>updateLandmarkStatus</code> value from the <a href="useLandmarks.html">useLandmarks</a> hook.</p>
  198. </div>
  199. <dl class="details">
  200. <p class="tag-source">
  201. <a href="src_components_LandmarkDetails.tsx.html" class="button">View Source</a>
  202. <span>
  203. <a href="src_components_LandmarkDetails.tsx.html">src/components/LandmarkDetails.tsx</a>, <a href="src_components_LandmarkDetails.tsx.html#line51">line 51</a>
  204. </span>
  205. </p>
  206. </dl>
  207. </div>
  208. <div class="member">
  209. <h4 class="name" id=".updateLandmarkStateFromParent">
  210. <a class="href-link" href="#.updateLandmarkStateFromParent">#</a>
  211. <span class='tag'>static</span>
  212. <span class="code-name">
  213. updateLandmarkStateFromParent<span class="signature">()</span><span class="type-signature"></span>
  214. </span>
  215. </h4>
  216. <div class="description">
  217. <p>Updates this component's <code>selectedLandmarkState</code> when the <code>landmark</code> prop passed down from the parent <a href="Map.html">Map</a>'s <code>selectedLandmark</code> is changed.
  218. Embedded in a useEffect that listens to the <code>landmark</code> prop.</p>
  219. </div>
  220. <dl class="details">
  221. <p class="tag-source">
  222. <a href="src_components_LandmarkDetails.tsx.html" class="button">View Source</a>
  223. <span>
  224. <a href="src_components_LandmarkDetails.tsx.html">src/components/LandmarkDetails.tsx</a>, <a href="src_components_LandmarkDetails.tsx.html#line40">line 40</a>
  225. </span>
  226. </p>
  227. </dl>
  228. </div>
  229. <div class="member">
  230. <h4 class="name" id="~editLandmark">
  231. <a class="href-link" href="#~editLandmark">#</a>
  232. <span class='tag'>async</span>
  233. <span class='tag'>inner</span>
  234. <span class="code-name">
  235. editLandmark<span class="signature">()</span><span class="type-signature"></span>
  236. </span>
  237. </h4>
  238. <div class="description">
  239. <p>Calls the <code>updateLandmark</code> mutation from the <a href="useLandmarks.html">useLandmarks</a> hook and closes the modal once finished.</p>
  240. </div>
  241. <dl class="details">
  242. <p class="tag-source">
  243. <a href="src_components_LandmarkDetails.tsx.html" class="button">View Source</a>
  244. <span>
  245. <a href="src_components_LandmarkDetails.tsx.html">src/components/LandmarkDetails.tsx</a>, <a href="src_components_LandmarkDetails.tsx.html#line87">line 87</a>
  246. </span>
  247. </p>
  248. </dl>
  249. </div>
  250. <div class="member">
  251. <h4 class="name" id="~removeLandmark">
  252. <a class="href-link" href="#~removeLandmark">#</a>
  253. <span class='tag'>async</span>
  254. <span class='tag'>inner</span>
  255. <span class="code-name">
  256. removeLandmark<span class="signature">()</span><span class="type-signature"></span>
  257. </span>
  258. </h4>
  259. <div class="description">
  260. <p>Calls the <code>deleteLandmark</code> mutation from the <a href="useLandmarks.html">useLandmarks</a> hook and closes the modal once finished.</p>
  261. </div>
  262. <dl class="details">
  263. <p class="tag-source">
  264. <a href="src_components_LandmarkDetails.tsx.html" class="button">View Source</a>
  265. <span>
  266. <a href="src_components_LandmarkDetails.tsx.html">src/components/LandmarkDetails.tsx</a>, <a href="src_components_LandmarkDetails.tsx.html#line96">line 96</a>
  267. </span>
  268. </p>
  269. </dl>
  270. </div>
  271. <div class="member">
  272. <h4 class="name" id="~toggleEditing">
  273. <a class="href-link" href="#~toggleEditing">#</a>
  274. <span class='tag'>inner</span>
  275. <span class="code-name">
  276. toggleEditing<span class="signature">()</span><span class="type-signature"></span>
  277. </span>
  278. </h4>
  279. <div class="description">
  280. <p>Toggles whether or not the <code>selectedLandmark</code> can be edited through the <code>editingEnabled</code> prop.</p>
  281. </div>
  282. <dl class="details">
  283. <p class="tag-source">
  284. <a href="src_components_LandmarkDetails.tsx.html" class="button">View Source</a>
  285. <span>
  286. <a href="src_components_LandmarkDetails.tsx.html">src/components/LandmarkDetails.tsx</a>, <a href="src_components_LandmarkDetails.tsx.html#line75">line 75</a>
  287. </span>
  288. </p>
  289. </dl>
  290. </div>
  291. </div>
  292. </div>
  293. </article>
  294. </section>
  295. </div>
  296. <footer class="footer">
  297. <div class="content has-text-centered">
  298. <p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.7</a></p>
  299. <p class="sidebar-created-by">
  300. <a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
  301. <a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
  302. </p>
  303. </div>
  304. </footer>
  305. </div>
  306. <div id="side-nav" class="side-nav">
  307. </div>
  308. </div>
  309. <script src="scripts/app.min.js"></script>
  310. <script>PR.prettyPrint();</script>
  311. <script src="scripts/linenumber.js"> </script>
  312. </body>
  313. </html>