Skip to content

Commit 59419c2

Browse files
committed
Removes outdated sections from user page
1 parent 5275023 commit 59419c2

File tree

3 files changed

+13
-60
lines changed

3 files changed

+13
-60
lines changed

src/components/projects/ProjectsList.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ export default function ProjectsList() {
4444
if (!organizationInactive) {
4545
refetchProjectsAndPostProcess();
4646
refetchStatsAndPostProcess();
47+
} else {
48+
setDataLoaded(true);
4749
}
4850
}, [organizationInactive, user]);
4951

@@ -70,7 +72,6 @@ export default function ProjectsList() {
7072

7173
const orgId = useSelector(selectOrganizationId);
7274
useWebsocket(orgId, Application.REFINERY, CurrentPage.PROJECTS, handleWebsocketNotification);
73-
7475
return (
7576
<div>
7677
{dataLoaded ? (<>

src/components/shared/header/Header.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ export default function Header() {
6464
});
6565
});
6666
}
67-
6867
return (
6968
<header className="sticky top-0 z-50 w-full">
7069
<div className="relative z-10 flex-shrink-0 h-16 bg-white border-b border-gray-200 shadow-sm flex justify-between items-center">
@@ -92,7 +91,7 @@ export default function Header() {
9291
</Tooltip>
9392
</a>
9493
</div>
95-
{(user?.role == UserRole.ENGINEER) ? (
94+
{(organizationInactive !== true && user?.role == UserRole.ENGINEER) ? (
9695
<div className="flex items-center justify-center">
9796
<a href="/refinery/users" onClick={(e: any) => { e.preventDefault(); dispatch(setProjectIdSampleProject(null)); router.push(`/users`) }}
9897
className="flex mr-6">
@@ -105,7 +104,7 @@ export default function Header() {
105104
<div className="flex items-center justify-center">
106105
{displayComments && <Comments />}
107106
</div>
108-
{user?.role == UserRole.ENGINEER && <div className="flex items-center justify-center">
107+
{organizationInactive !== true && user?.role == UserRole.ENGINEER && <div className="flex items-center justify-center">
109108
<button className="flex mr-6 cursor-pointer" onClick={openModalAndRefetchNotifications}>
110109
<Tooltip content={TOOLTIPS_DICT.GENERAL.NOTIFICATION_CENTER} placement="bottom" color="invert">
111110
<MemoIconBell className="w-6 h-6" />

src/components/users/UsersList.tsx

Lines changed: 9 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
1-
import { selectAnnotators, selectEngineers, selectExperts, selectInactiveOrganization } from "@/src/reduxStore/states/general";
1+
import { selectEngineers } from "@/src/reduxStore/states/general";
22
import { useSelector } from "react-redux"
3-
import YoutubeIntroduction from "../projects/YoutubeIntroduction";
43
import { User } from "@/src/types/shared/general";
54
import { UNKNOWN_USER } from "@/src/util/constants";
6-
import { MemoIconUsersGroup } from "@/submodules/react-components/components/kern-icons/icons";
75

86
export default function UsersList() {
9-
const organizationInactive = useSelector(selectInactiveOrganization);
107
const engineers = useSelector(selectEngineers);
11-
const annotators = useSelector(selectAnnotators);
12-
const experts = useSelector(selectExperts);
138

149
return <div className="bg-gray-100">
15-
{!organizationInactive && <div>
10+
<div>
1611
<div className="mx-auto mt-8 pb-12 px-4 sm:px-6">
1712
<div className="grid grid-cols-1 gap-8">
1813
<div className="space-y-5 sm:space-y-4">
1914
<h3 className="text-2xl font-semibold tracking-tight sm:text-4xl">Engineering team</h3>
2015
<p className="text-gray-900">Administers the project and works on programmatic tasks such as
2116
labeling automation or filter settings.</p>
22-
<p className="text-gray-500">They have access to all features of the application, including
23-
the Python SDK.</p>
17+
<p className="text-gray-500">They have access to all features of the application</p>
2418
</div>
2519
<div className="grid grid-cols-1 gap-4 sm:grid-cols-3">
2620
{engineers.map((user: User) => (
@@ -38,7 +32,10 @@ export default function UsersList() {
3832
</div>
3933
))}
4034
</div>
41-
<div className="relative">
35+
{/* commented Display for EXPERTS & ANNOTATORS since both are currently unable to access Refinery, only ANNOTATORS are currently in use and only for Cognition */}
36+
{/* After rework we might want to reuse some of these*/}
37+
38+
{/* <div className="relative">
4239
<div className="absolute inset-0 flex items-center" aria-hidden="true">
4340
<div className="w-full border-t border-gray-300"></div>
4441
</div>
@@ -106,54 +103,10 @@ export default function UsersList() {
106103
<h2 className="mt-2 text-lg font-medium text-gray-900">Add annotators</h2>
107104
<p className="mt-1 text-sm text-gray-500">Let us know if you want to add annotators.
108105
</p>
109-
</div>}
106+
</div>} */}
110107
</div>
111108
</div>
112109
</div>
113-
}
114-
{organizationInactive && <div>
115-
<div className="h-screen relative bg-white overflow-hidden">
116-
<div className="hidden lg:block lg:absolute lg:inset-0" aria-hidden="true">
117-
<svg className="h-screen absolute top-0 left-1/2 transform translate-x-64 -translate-y-8" width="640"
118-
height="784" fill="none" viewBox="0 0 640 784">
119-
<defs>
120-
<pattern id="9ebea6f4-a1f5-4d96-8c4e-4c2abf658047" x="118" y="0" width="20" height="20"
121-
patternUnits="userSpaceOnUse">
122-
<rect x="0" y="0" width="4" height="4" className="text-gray-200" fill="currentColor" />
123-
</pattern>
124-
</defs>
125-
<rect y="72" width="640" height="640" className="text-gray-50" fill="currentColor" />
126-
<rect x="118" width="404" height="784" fill="url(#9ebea6f4-a1f5-4d96-8c4e-4c2abf658047)" />
127-
</svg>
128-
</div>
129-
<div className="relative pt-6 pb-16 sm:pb-24 lg:pb-32">
130-
<main className="mt-16 mx-auto px-4 sm:mt-24 sm:px-6 lg:mt-32">
131-
<div className="lg:grid lg:grid-cols-12 lg:gap-8">
132-
<div className="sm:text-center md:max-w-2xl md:mx-auto lg:col-span-6 lg:text-left">
133-
<div>
134-
<div className="text-gray-500 font-semibold text-base uppercase">You&apos;re now on the waitlist!
135-
</div>
136-
<div className="font-extrabold text-gray-900 text-5xl mt-1">
137-
You don&apos;t want to <span className="text-green-800">wait?</span>
138-
</div>
139-
<div className="font-normal text-xl text-gray-500 mt-5">
140-
In a 15 minute onboarding call, we can directly assign you access. Reach out to us &nbsp;
141-
<a href="https://www.kern.ai/schedule-demo" target="_blank"><span
142-
className="underline cursor-pointer">here</span></a>.
143-
</div>
144-
<div className="text-gray-500 mt-5">
145-
In the meantime, feel free to take a look at a product demo or check out our &nbsp;
146-
<a href="https://docs.kern.ai/" target="_blank"><span
147-
className="underline cursor-pointer">documentation</span></a>. If you have any
148-
questions, contact us any time.
149-
</div>
150-
</div>
151-
</div>
152-
<YoutubeIntroduction />
153-
</div>
154-
</main>
155-
</div>
156-
</div>
157-
</div>}
110+
158111
</div>
159112
}

0 commit comments

Comments
 (0)