Help with FileObject in File DropdownItems

hi. im trying to add a button to the file dropdown menu, but i can't find a way to get the clicked file object.
import React, { useState } from "react";

import { ServerContext } from '@/state/server';
import { join } from 'path';
import { FileObject } from '@/api/server/files/loadDirectory';

const DropDownButton = () => {

const uuid = ServerContext.useStoreState((state) => state.server.data!.uuid);

return <h1>dropdown_button</h1>;
};

export default DropDownButton;
import React, { useState } from "react";

import { ServerContext } from '@/state/server';
import { join } from 'path';
import { FileObject } from '@/api/server/files/loadDirectory';

const DropDownButton = () => {

const uuid = ServerContext.useStoreState((state) => state.server.data!.uuid);

return <h1>dropdown_button</h1>;
};

export default DropDownButton;
basically i want to access the file name inside the component so i can check the file type. and based on the file type the button will appear.
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?