Skip to content

Commit

Permalink
[recnet-web] fix login bug (#353)
Browse files Browse the repository at this point in the history
## Description

<!--- Describe your changes in detail -->
Fix bug when login after #352 

![Screenshot 2024-11-07 at 11 55
19 PM](https://github.com/user-attachments/assets/a219f55c-b86f-4a0e-a675-bae2b67924b8)


## Related Issue

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->

## Notes

<!-- Other thing to say -->

## Test

<!--- Please describe in detail how you tested your changes locally. -->
https://recnet-git-fix-login-bug-recnet-542617e7.vercel.app/

This is the preview site for this branch (with the fix). Should be able
to login without seeing any error.

## Screenshots (if appropriate):

<!--- Add screenshots of your changes here -->

## TODO

- [ ] Clear `console.log` or `console.error` for debug usage
- [ ] Update the documentation `recnet-docs` if needed
  • Loading branch information
swh00tw authored Nov 8, 2024
2 parents 0a37632 + 050776a commit 69e7501
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions apps/recnet/src/components/setting/UserSettingDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { Dialog, Button, Text } from "@radix-ui/themes";
import { Settings } from "lucide-react";
import React, { useMemo, useState, createContext, useContext } from "react";

import { useAuth } from "@recnet/recnet-web/app/AuthContext";
import { cn } from "@recnet/recnet-web/utils/cn";

import { AccountSetting } from "./account/AccountSetting";
Expand Down Expand Up @@ -58,16 +57,11 @@ interface UserSettingDialogProps {

export function UserSettingDialogProvider(props: UserSettingDialogProps) {
const { children } = props;
const { user } = useAuth();
const [open, setOpen] = useState(false);
const [activeTab, setActiveTab] = useState<TabKey>("PROFILE");

const TabComponent = useMemo(() => tabs[activeTab].component, [activeTab]);

if (!user) {
return children;
}

return (
<UserSettingDialogContext.Provider
value={{
Expand Down

0 comments on commit 69e7501

Please sign in to comment.