Skip to content

Commit c62aa42

Browse files
committed
minor
1 parent c269685 commit c62aa42

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/pages/Perspective/PerspectivePath.js

+12-8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export const queryAvailablePerspectives = gql`
3535
query availablePerspectives($dictionary_id: LingvodocID!) {
3636
dictionary(id: $dictionary_id) {
3737
id
38+
category
3839
perspectives {
3940
id
4041
parent_id
@@ -89,6 +90,7 @@ class PerspectivePath extends React.Component {
8990
const dictionary_id_tree = tree[1].id;
9091

9192
const {
93+
category,
9294
perspectives,
9395
additional_metadata: { license }
9496
} = queryAvailablePerspectives.dictionary;
@@ -173,14 +175,16 @@ class PerspectivePath extends React.Component {
173175
actions.openStatistics(id, "perspective", `'${T(e.translations)}' ${statistics_str}`)
174176
}
175177
/>
176-
<Dropdown.Item
177-
key="upload"
178-
icon={<i className="lingvo-icon lingvo-icon_stats" />}
179-
text={this.context("Upload")}
180-
onClick={() =>
181-
actions.openUploadModal(id, `'${T(e.translations)}' ${upload_str}`)
182-
}
183-
/>
178+
{user.id !== undefined && category == 1 && (
179+
<Dropdown.Item
180+
key="upload"
181+
icon={<i className="lingvo-icon lingvo-icon_published" />}
182+
text={this.context("Upload")}
183+
onClick={() =>
184+
actions.openUploadModal(id, `'${T(e.translations)}' ${upload_str}`)
185+
}
186+
/>
187+
)}
184188
</Dropdown.Menu>
185189
</Dropdown>
186190
) : index === tree.length - 2 ? (

0 commit comments

Comments
 (0)