Skip to content

Commit

Permalink
Add missing jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
francisli committed Apr 4, 2024
1 parent 49a9609 commit 744e0e7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import Index from './pages';
import Login from './pages/login';
import NavBar from './components/NavBar';

/**
* Top-level application component.
*/
function App() {
return (
<>
Expand Down
3 changes: 3 additions & 0 deletions client/src/components/NavBar.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React from 'react';

/**
* Primary navigation component.
*/
function NavBar() {
return (
<nav>
Expand Down
3 changes: 3 additions & 0 deletions client/src/pages/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React from 'react';
import { useQuery } from '@tanstack/react-query';

/**
* Home page component.
*/
function Index() {
const { isFetching, error } = useQuery({
queryKey: ['users'],
Expand Down
3 changes: 3 additions & 0 deletions client/src/pages/login.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React from 'react';

/**
* Login page component.
*/
function Login() {
return <div>Login page works</div>;
}
Expand Down
4 changes: 2 additions & 2 deletions client/src/stories/Page/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import { Header } from '../Header/Header.jsx';
import './page.css';

/**
* Storybook demo page component.
* @typedef User
* @property {string} name
* @property {string} name Full name of the User.
*/

export const Page = () => {
const [user, setUser] = React.useState(/** @type {?User} */ (null));

Expand Down

0 comments on commit 744e0e7

Please sign in to comment.