Skip to content

Commit

Permalink
Merge pull request #1371 from gchq/chore/refactor-confusing-component…
Browse files Browse the repository at this point in the history
…-names

Refactor component names due to confusing use of page terminology part 1
  • Loading branch information
ARADDCC012 authored Jul 1, 2024
2 parents cef9d3d + 890ec20 commit b21fa2c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions frontend/src/entry/CreateEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { FormEvent, useMemo, useState } from 'react'
import Loading from 'src/common/Loading'
import EntryDescriptionInput from 'src/entry/EntryDescriptionInput'
import EntryNameInput from 'src/entry/EntryNameInput'
import EntryAccess from 'src/entry/settings/EntryAccess'
import EntryAccessInput from 'src/entry/settings/EntryAccessInput'
import MessageAlert from 'src/MessageAlert'
import TeamSelect from 'src/TeamSelect'
import {
Expand Down Expand Up @@ -193,7 +193,7 @@ export default function CreateEntry({ kind, onBackClick }: CreateEntryProps) {
schema has been selected.
</Typography>
<Box sx={{ marginTop: 1 }}>
<EntryAccess
<EntryAccessInput
value={collaborators}
onUpdate={(val) => setCollaborators(val)}
entryKind={EntryKind.MODEL}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import MessageAlert from 'src/MessageAlert'
import { CollaboratorEntry, EntityObject, EntryKindKeys, Role } from 'types/types'
import { toSentenceCase } from 'utils/stringUtils'

type EntryAccessProps = {
type EntryAccessInputProps = {
value: CollaboratorEntry[]
onUpdate: (list: CollaboratorEntry[]) => void
entryKind: EntryKindKeys
entryRoles: Role[]
}

export default function EntryAccess({ value, onUpdate, entryKind, entryRoles }: EntryAccessProps) {
export default function EntryAccessInput({ value, onUpdate, entryKind, entryRoles }: EntryAccessInputProps) {
const [open, setOpen] = useState(false)
const [accessList, setAccessList] = useState<CollaboratorEntry[]>(value)
const [userListQuery, setUserListQuery] = useState('')
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/entry/settings/EntryAccessPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useState } from 'react'
import HelpDialog from 'src/common/HelpDialog'
import Loading from 'src/common/Loading'
import EntryRolesInfo from 'src/entry/model/settings/EntryRolesInfo'
import EntryAccess from 'src/entry/settings/EntryAccess'
import EntryAccessInput from 'src/entry/settings/EntryAccessInput'
import useNotification from 'src/hooks/useNotification'
import MessageAlert from 'src/MessageAlert'
import { CollaboratorEntry, EntryInterface } from 'types/types'
Expand Down Expand Up @@ -63,7 +63,7 @@ export default function EntryAccessPage({ entry }: EntryAccessPageProps) {
</Typography>
<HelpDialog title='What are roles?' content={<EntryRolesInfo entry={entry} />} />
</Stack>
<EntryAccess
<EntryAccessInput
value={entry.collaborators}
onUpdate={(val) => setAccessList(val)}
entryKind={entry.kind}
Expand Down

0 comments on commit b21fa2c

Please sign in to comment.