Sort plugin mod file list by nexus_file_id
This commit is contained in:
parent
0616a92bbc
commit
f33fd3b49c
@ -256,7 +256,7 @@ const Map: React.FC = () => {
|
|||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
if (map.current) map.current.resize();
|
if (map.current) map.current.resize();
|
||||||
});
|
});
|
||||||
}, [map]);
|
}, [map, dispatch]);
|
||||||
|
|
||||||
const clearSelectedMod = useCallback(() => {
|
const clearSelectedMod = useCallback(() => {
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
|
@ -98,6 +98,7 @@ const PluginModList: React.FC<Props> = ({ mods, files, counts }) => {
|
|||||||
<ul className={styles["file-list"]}>
|
<ul className={styles["file-list"]}>
|
||||||
{files
|
{files
|
||||||
.filter((file) => file.mod_id === mod.id)
|
.filter((file) => file.mod_id === mod.id)
|
||||||
|
.sort((a, b) => b.nexus_file_id - a.nexus_file_id)
|
||||||
.map((file) => (
|
.map((file) => (
|
||||||
<li key={file.id}>
|
<li key={file.id}>
|
||||||
<div>
|
<div>
|
||||||
|
@ -53,7 +53,7 @@ export interface File {
|
|||||||
version?: string;
|
version?: string;
|
||||||
mod_version?: string;
|
mod_version?: string;
|
||||||
size: number;
|
size: number;
|
||||||
uploaded_at?: Date;
|
uploaded_at?: number;
|
||||||
has_download_link: boolean;
|
has_download_link: boolean;
|
||||||
updated_at: Date;
|
updated_at: Date;
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
Loading…
Reference in New Issue
Block a user