GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge pull request #3 from bamboo-firewall/quannt86/dev · bamboo-firewall/fe@1c0b744

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/provider
    • AppProvider.tsx
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/provider/AppProvider.tsx‎

Copy file name to clipboardExpand all lines: src/provider/AppProvider.tsx
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ const AppProvider: React.FC<Props> = ({ children }) => {
2929
const res: APIResponse<IContextValue['userInfo']> = await BambooService.getUserInfo();
3030
if (res?.error) return null;
3131
message.success(`Welcome back, ${res?.data?.name}`);
32-
return res?.data;
32+
33+
const role = res?.data?.role ?? 'user';
34+
return { ...res?.data, role: role.toLowerCase() as IUser['role'] };
3335
},
3436
{
3537
staleTime: Infinity,

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.