• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gitify-app / gitify / 13031932468

29 Jan 2025 01:03PM UTC coverage: 87.981% (+0.09%) from 87.888%
13031932468

Pull #1781

github

web-flow
Merge 2d8847eff into 73b203001
Pull Request #1781: feat(auth): use system browser for GitHub SSO / OAuth authentication

651 of 725 branches covered (89.79%)

Branch coverage included in aggregate %.

32 of 39 new or added lines in 4 files covered. (82.05%)

26 existing lines in 1 file now uncovered.

1728 of 1979 relevant lines covered (87.32%)

23.64 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/renderer/App.tsx
1
import { useContext } from 'react';
×
2
import {
×
3
  Navigate,
4
  Route,
5
  HashRouter as Router,
6
  Routes,
7
  useLocation,
8
} from 'react-router-dom';
9

10
import { BaseStyles, Box, ThemeProvider } from '@primer/react';
×
11

12
import { Loading } from './components/Loading';
×
13
import { Sidebar } from './components/Sidebar';
×
14
import { AppContext, AppProvider } from './context/App';
×
15
import { AccountsRoute } from './routes/Accounts';
×
16
import { FiltersRoute } from './routes/Filters';
×
17
import { LoginRoute } from './routes/Login';
×
18
import { LoginWithOAuthAppRoute } from './routes/LoginWithOAuthApp';
×
19
import { LoginWithPersonalAccessTokenRoute } from './routes/LoginWithPersonalAccessToken';
×
20
import { NotificationsRoute } from './routes/Notifications';
×
21
import { SettingsRoute } from './routes/Settings';
×
22

23
import './App.css';
×
24

25
function RequireAuth({ children }) {
26
  const { isLoggedIn } = useContext(AppContext);
×
27
  const location = useLocation();
×
28

29
  return isLoggedIn ? (
×
30
    children
31
  ) : (
32
    <Navigate to="/login" replace state={{ from: location }} />
33
  );
34
}
35

36
export const App = () => {
×
37
  return (
×
38
    <ThemeProvider>
39
      <BaseStyles>
40
        <AppProvider>
41
          <Router>
42
            <Box className="flex flex-col min-h-screen overflow-x-hidden overflow-y-auto pl-sidebar bg-gitify-background">
43
              <Loading />
44
              <Sidebar />
45
              <Routes>
46
                <Route
47
                  path="/"
48
                  element={
49
                    <RequireAuth>
50
                      <NotificationsRoute />
51
                    </RequireAuth>
52
                  }
53
                />
54
                <Route
55
                  path="/filters"
56
                  element={
57
                    <RequireAuth>
58
                      <FiltersRoute />
59
                    </RequireAuth>
60
                  }
61
                />
62
                <Route
63
                  path="/settings"
64
                  element={
65
                    <RequireAuth>
66
                      <SettingsRoute />
67
                    </RequireAuth>
68
                  }
69
                />
70
                <Route
71
                  path="/accounts"
72
                  element={
73
                    <RequireAuth>
74
                      <AccountsRoute />
75
                    </RequireAuth>
76
                  }
77
                />
78
                <Route path="/login" element={<LoginRoute />} />
79
                <Route
80
                  path="/login-personal-access-token"
81
                  element={<LoginWithPersonalAccessTokenRoute />}
82
                />
83
                <Route
84
                  path="/login-oauth-app"
85
                  element={<LoginWithOAuthAppRoute />}
86
                />
87
              </Routes>
88
            </Box>
89
          </Router>
90
        </AppProvider>
91
      </BaseStyles>
92
    </ThemeProvider>
93
  );
94
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc