Skip to content

Commit

Permalink
Bitti sanırım
Browse files Browse the repository at this point in the history
  • Loading branch information
RengaN02 committed Jan 25, 2025
1 parent f1a508b commit 4a3d9cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
randomise = SANITIZE_LIST(randomise)
job_preferences = SANITIZE_LIST(job_preferences)
all_quirks = SANITIZE_LIST(all_quirks)
alt_job_titles = SANITIZE_LIST(alt_job_titles)

//Validate job prefs
for(var/j in job_preferences)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { sortBy } from 'common/collections';
import { PropsWithChildren, ReactNode, useState } from 'react';
import { PropsWithChildren, ReactNode } from 'react';
import { useBackend } from 'tgui/backend';
import { Box, Button, Dropdown, Stack, Tooltip } from 'tgui-core/components';
import { classes } from 'tgui-core/react';
Expand Down Expand Up @@ -199,9 +199,9 @@ function JobRow(props: JobRowProps) {
const alt_titles = [...(job.alt_titles || [])];
if (!alt_titles.includes(name)) alt_titles.push(name);

const [selectedAltTitle, setSelectedAltTitle] = useState(
data.job_alt_titles[name] ? data.job_alt_titles[name] : name,
);
let selectedAltTitle = data.job_alt_titles[name]
? data.job_alt_titles[name]
: name;

let rightSide: ReactNode;

Expand Down Expand Up @@ -270,10 +270,8 @@ function JobRow(props: JobRowProps) {
<Dropdown
width="100%"
options={alt_titles}
displayText={selectedAltTitle}
selected={selectedAltTitle}
onSelected={(value) => {
setSelectedAltTitle(value);
act('set_job_title', { job: name, new_title: value });
}}
color=""
Expand Down

0 comments on commit 4a3d9cd

Please sign in to comment.