Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor session logic into its own hook #369

Merged
merged 3 commits into from
Jun 6, 2024
Merged

Refactor session logic into its own hook #369

merged 3 commits into from
Jun 6, 2024

Conversation

bruugey
Copy link
Collaborator

@bruugey bruugey commented May 29, 2024

  • Adds useSession hook
  • Creates index file for all hooks
  • Changes hooks to named exports from default, and imports them from hooks root
  • Moves 700px max width to the right place (currently not taking effect)

@bruugey bruugey requested a review from stephl3 May 29, 2024 14:39
import { useEffect, useState } from "react";
import { css } from "@emotion/css";
import Button from "@leafygreen-ui/button";
import { useEffect, useState } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

think we can drop these imports at this point?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep good catch

import { useEffect, useState } from 'react';
import { getSession, Session } from '@/auth';

export const useSession = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bruugey bruugey requested a review from stephl3 June 4, 2024 16:42
@bruugey bruugey merged commit 9c654dc into staging Jun 6, 2024
3 checks passed
@bruugey bruugey deleted the brooke/refac branch June 6, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants