Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions web/apps/client-demo/src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import Projects from './pages/settings/Projects';
import ProjectDetails from './pages/settings/ProjectDetails';
import Teams from './pages/settings/Teams';
import TeamDetails from './pages/settings/TeamDetails';
import ServiceAccounts from './pages/settings/ServiceAccounts';
import ServiceAccountDetails from './pages/settings/ServiceAccountDetails';

function Router() {
return (
Expand All @@ -42,6 +44,8 @@ function Router() {
<Route path="projects/:projectId" element={<ProjectDetails />} />
<Route path="teams" element={<Teams />} />
<Route path="teams/:teamId" element={<TeamDetails />} />
<Route path="service-accounts" element={<ServiceAccounts />} />
<Route path="service-accounts/:serviceAccountId" element={<ServiceAccountDetails />} />
</Route>
<Route path="*" element={<Navigate to="/" replace />} />
</Routes>
Expand Down
3 changes: 2 additions & 1 deletion web/apps/client-demo/src/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const NAV_ITEMS = [
{ label: 'Members', path: 'members' },
{ label: 'Security', path: 'security' },
{ label: 'Projects', path: 'projects' },
{ label: 'Teams', path: 'teams' }
{ label: 'Teams', path: 'teams' },
{ label: 'Service Accounts', path: 'service-accounts' }
];

export default function Settings() {
Expand Down
24 changes: 24 additions & 0 deletions web/apps/client-demo/src/pages/settings/ServiceAccountDetails.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { useParams, useNavigate } from 'react-router-dom';
import { ServiceAccountDetailsView } from '@raystack/frontier/react';

export default function ServiceAccountDetails() {
const { orgId, serviceAccountId } = useParams<{
orgId: string;
serviceAccountId: string;
}>();
const navigate = useNavigate();

if (!serviceAccountId) return null;

return (
<ServiceAccountDetailsView
serviceAccountId={serviceAccountId}
onNavigateToServiceAccounts={() =>
navigate(`/${orgId}/settings/service-accounts`)
}
onDeleteSuccess={() =>
navigate(`/${orgId}/settings/service-accounts`)
}
/>
);
}
15 changes: 15 additions & 0 deletions web/apps/client-demo/src/pages/settings/ServiceAccounts.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { useParams, useNavigate } from 'react-router-dom';
import { ServiceAccountsView } from '@raystack/frontier/react';

export default function ServiceAccounts() {
const { orgId } = useParams<{ orgId: string }>();
const navigate = useNavigate();

return (
<ServiceAccountsView
onServiceAccountClick={id =>
navigate(`/${orgId}/settings/service-accounts/${id}`)
}
/>
);
}
18 changes: 9 additions & 9 deletions web/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/sdk/react/components/onboarding/updates.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';

import { yupResolver } from '@hookform/resolvers/yup';
import { ReactNode } from 'react';
import { type ReactNode } from 'react';
import { Button, Flex, Text, Switch, Skeleton } from '@raystack/apsara';
import { Controller, useForm } from 'react-hook-form';
import * as yup from 'yup';
Expand Down
4 changes: 4 additions & 0 deletions web/sdk/react/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export { MembersView } from './views-new/members';
export { SecurityView } from './views-new/security';
export { ProjectsView, ProjectDetailsView } from './views-new/projects';
export { TeamsView, TeamDetailsView } from './views-new/teams';
export {
ServiceAccountsView,
ServiceAccountDetailsView
} from './views-new/service-accounts';

export type {
FrontierClientOptions,
Expand Down
Loading
Loading